home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1992-08-06 | 98.9 KB | 2,382 lines
(*^ ::[paletteColors = 128; showRuler; magnification = 125; currentKernel; fontset = title, inactive, nohscroll, noKeepOnOnePage, preserveAspect, cellOutline, groupLikeTitle, center, M7, R65535, L1, e8, 24, "CalcMath"; ; fontset = subtitle, inactive, nohscroll, noKeepOnOnePage, preserveAspect, groupLikeTitle, center, M7, bold, L1, e6, 18, "CalcMath"; ; fontset = subsubtitle, inactive, nohscroll, noKeepOnOnePage, preserveAspect, groupLikeTitle, center, M7, bold, L1, e6, 18, "CalcMath"; ; fontset = section, inactive, nohscroll, noKeepOnOnePage, preserveAspect, groupLikeSection, grayBox, M22, bold, L1, a20, 18, "CalcMath"; ; fontset = subsection, inactive, nohscroll, noKeepOnOnePage, preserveAspect, groupLikeSection, blackBox, M19, R32767, B32767, L1, a15, 16, "CalcMath"; ; fontset = subsubsection, inactive, nohscroll, noKeepOnOnePage, preserveAspect, groupLikeSection, whiteBox, M18, L1, a12, 14, "CalcMath"; ; fontset = text, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, B65535, L1, 14, "CalcMath"; ; fontset = smalltext, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 14, "CalcMath"; ; fontset = input, nowordwrap, preserveAspect, groupLikeInput, M42, N23, bold, L1, 12, "Courier"; ; fontset = output, output, inactive, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5, 12, "Courier"; ; fontset = message, inactive, preserveAspect, groupLikeOutput, M42, N23, R65535, B65535, L1, 12, "Courier"; ; fontset = print, inactive, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1, 12, "Courier"; ; fontset = info, inactive, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1, 12, "Courier"; ; fontset = postscript, PostScript, formatAsPostScript, output, inactive, nowordwrap, preserveAspect, groupLikeGraphics, M7, l34, w248, h323, L1, 12, "Courier"; ; fontset = name, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, italic, L1, 10, "Times"; ; fontset = header, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = Left Header, nohscroll, cellOutline, 12; fontset = footer, inactive, nohscroll, noKeepOnOnePage, preserveAspect, center, M7, L1, 12; fontset = Left Footer, cellOutline, blackBox, 12; fontset = help, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 10, "Times"; ; fontset = clipboard, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = completions, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12, "Courier"; ; fontset = special1, inactive, nohscroll, noKeepOnOnePage, preserveAspect, whiteBox, M7, B65535, L1, 14, "CalcMath"; ; fontset = special2, inactive, nohscroll, noKeepOnOnePage, preserveAspect, center, M7, R32767, B32767, L1, 12, "Courier"; ; fontset = special3, inactive, nohscroll, noKeepOnOnePage, preserveAspect, right, M7, bold, L1, 12, "CalcMath"; ; fontset = special4, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, bold, italic, L1, 12, "CalcMath"; ; fontset = special5, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, italic, L1, 12, "CalcMath"; ; next21StandardFontEncoding; ] :[font = title; inactive; preserveAspect; ] Calculus&Mathematica The second year course :[font = subsubtitle; inactive; Cclosed; preserveAspect; startGroup; ] Bill Davis, Horacio Porta and Jerry Uhl :[font = text; inactive; preserveAspect; endGroup; ] Don Brown was an undergraduate student in physics at the University of Illinois at Urbana-Champaign. He is now a graduate student in mathematics at University of California,Berkeley. Bill Davis is a professor of mathematics at Ohio State University. Horacio Porta is a professor of mathematics at the University of Illinois at Urbana-Champaign. Jerry Uhl is a professor of mathematics at the University of Illinois at Urbana-Champaign. :[font = special2; inactive; preserveAspect; ] Technical Crew: Don Brown in California Alan DeGuzman, Justin Gallivan and David Wiltz in Illinois and Corey Mutter in Ohio :[font = special2; inactive; preserveAspect; ] ©Copyright 1992 by Addison-Wesley Publishing Company,Inc. The rights to all modifications are assigned to Addison-Wesley Publishing Company Inc. :[font = title; inactive; Cclosed; preserveAspect; startGroup; ] Vector fields and components :[font = text; inactive; preserveAspect; endGroup; ] July 3,1991 Filtered Oct 28. 1991 (Davis) CalcMath font, December 12, 1991 Revision December 20, 1991 :[font = section; inactive; Cclosed; preserveAspect; startGroup; ] Initialization Cells :[font = subsubsection; inactive; initialization; Cclosed; preserveAspect; startGroup; ] Vector Drawers :[font = input; initialization; Cclosed; preserveAspect; startGroup; ] *) (* Two and Three Dimensional Vector Builder *) (* It includes a couple of useful commands like the cross product and norm of a vector. *) (* Bill Davis, April, 1992 *) (* :[font = input; initialization; preserveAspect; endGroup; endGroup; ] *) BeginPackage["Vectors3D`","Graphics`Colors`"]; Perp::usage = "Perp[expr] returns a single 3-d vector which is perpendicular to the vector, 'expr'."; Cross::usage = "Cross[a,b] returns the cross product of a and b."; Norm::usage = "Norm[expr] returns the Euclidean length of the vector, 'expr'."; Turn::usage = "Turn[expr] returns an orthogonal 3 by 3 matrix which takes {0,0,1} to 'expr'."; Vector::notnum = "The vectors `1` and `2` aren't numeric."; Arrow::usage = "Arrow[expr] produces a 2 or 3 dimensional vector from the origin to expr. Arrow[expr,Tail->tail] gives a vector from tail to expr. RGBColor and Thickness may be added as options"; Vector::usage = "Vector[a,b] gives a vector from a to b. RGBColor and Thickness may be added as options"; Vector2D::usage = "Vector2D[a,b] produces a 2-d graphics object, a vector from a to b. Vector[a,b,options] produces the graphics object with the styles such as RGBColor and Thickness included."; Vector3D::usage = "Vector3D[a,b] produces the 3-d graphics object, a vector from a to b. Vector3D[a,b,options] produces the graphics object with the options such as RGBColor and Thickness included."; Begin["`Private`"]; SetOptions[ParametricPlot,AspectRatio->Automatic]; SetOptions[Plot,AspectRatio->Automatic]; SetOptions[Graphics,AspectRatio->Automatic]; Perp[a_?VectorQ] := If[a[[1]]==0,Return[{1,0,0}], If[a[[2]]==0,Return[{0,1,0}], Return[{-a[[2]],a[[1]],0}]]]; Cross[a_?VectorQ,b_?VectorQ]:={a[[2]]b[[3]]-a[[3]]b[[2]], a[[3]]b[[1]]-a[[1]]b[[3]], a[[1]]b[[2]]-a[[2]]b[[1]]}; Norm[a_?VectorQ]:=Sqrt[a.a]; Turn[a_?VectorQ] := Module[{A = a, B}, B = Perp[A]/Norm[Perp[A]]; A = a/Norm[a]; Return[Transpose[{B,A~Cross~B,A}]] ]; options[f_]:=Module[{e,a,g}, If[f=={},g={RGBColor[0,0,0],Thickness[0.007]}, g=f]; e = Sort[g]; If[Length[e]<2,e=Join[e,{{0,0,0},{0}}], Null]; If[Head[e[[1]]]===Head[GrayLevel[0.0]], a={{e[[1,1]]},0.007}, If[Head[e[[1]]]===Head[RGBColor[1,1,1]], a={{e[[1,1]],e[[1,2]],e[[1,3]]},.007}, a={{0,0,0},.007};e=Join[{{0}},e]]]; If[Head[e[[2]]]===Head[Thickness[0.01]], a[[2]] = e[[2,1]],Null]; Return[a]]; corn = Table[N[1/4 {1.3Cos[2 k Pi/7],1.3Sin[2 k Pi/7],-4}], {k,0,9}]; corners[a_] := N[Table[(a.corn[[j]]),{j,1,10}]]; head[A_,a_,b_] := Flatten[ Table[{b,b+0.17 Norm[b-a] corners[A][[j-1]], b + 0.17 Norm[b-a] corners[A][[j]]},{j,2,9}],1]; Vector3D[a_,b_,opts___] := Module[{A,B,AA,BB,m,aa,bb,f={opts},e}, aa=N[a];bb=N[b]; If[!NumberQ[aa.aa+bb.bb], Message[Vector::notnum,a,b];Return[Null], A = Turn[bb-aa]; B = head[A,aa,bb]; e=options[f]; If[Length[e[[1]]]==3, Return[Graphics3D[{{RGBColor[e[[1,1]],e[[1,2]],e[[1,3]]], Thickness[e[[2]]],Line[{aa,bb}]}, {SurfaceColor[RGBColor[e[[1,1]],e[[1,2]],e[[1,3]]]], Polygon[B]}}]], Return[Graphics3D[{{GrayLevel[e[[1,1]]], Thickness[e[[2]]],Line[{aa,bb}]}, {SurfaceColor[GrayLevel[e[[1,1]]]], Polygon[B]}}]]; ]]]; Vector2D[from_,to_,opts___] := Module[{A,B,AA,BB,c,d,f={opts},e}, AA=N[to]; BB=N[from]; If[!NumberQ[AA.AA+BB.BB], Message[Vector::notnum,from,to]; Return[Null], A=AA-BB; B = RotateLeft[A] {-1,1}; c = AA - 0.22 A + .07 B; d = AA - 0.22 A - .07 B; e=options[f]; If[Length[e[[1]]]==3, Return[ Graphics[{{RGBColor[e[[1,1]],e[[1,2]],e[[1,3]]], Thickness[e[[2]]],Line[{BB,AA}]}, {RGBColor[e[[1,1]],e[[1,2]],e[[1,3]]], Polygon[{AA,c,d}]}}]];, Return[ Graphics[{{GrayLevel[e[[1,1]]], Thickness[e[[2]]],Line[{BB,AA}]}, {GrayLevel[e[[1,1]]], Polygon[{AA,c,d}]}}]]]]]; Vector[from_,to_,opts___]:= If[Length[N[from]]==2,Return[Vector2D[from,to,opts]], Return[Vector3D[from,to,opts]]]; Arrow[vec_,start_Rule,opts___]:= Module[{a}, a=ToExpression["Tail"]/.{start}; If[Length[N[vec]]==2, Return[Vector2D[a,a+vec,opts]], Return[Vector3D[a,a+vec,opts]]] ]; Arrow[to_,opts___] := If[Length[N[to]]==2, Return[Vector2D[{0,0},to,opts]], Return[Vector3D[{0,0,0},to,opts]]]; (*Protect[Perp,Cross,Turn,Vector3D,Vector2D,Vector,Arrow];*) End[]; EndPackage[]; Null (* :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup; ] Messages and packages :[font = input; preserveAspect; endGroup; endGroup; ] Needs["Graphics`ParametricPlot3D`"]; Off[General::spell]; Off[General::spell1]; $DefaultFont={"Courier-Bold",18}; Off[ParametricPlot::ppcom]; Off[ParametricPlot3D::ppcom]; Off[Unset::norep]; :[font = section; inactive; Cclosed; preserveAspect; startGroup; ] Basics :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] B.1) What's a component? :[font = text; inactive; preserveAspect; ] Here's a friendly old picture. :[font = input; preserveAspect; ] lines=Graphics[Line[{{-1,0},{3,0}}],Line[{{0,-1},{0,2.5}}], GrayLevel[0.4],Line[{{2.5,0},{2.5,2}}], Line[{{0,2},{2.5,2}}]]; vecs={Vector[{0,0},{2.5,2},RGBColor[1,0,0]], Vector[{0,0},{2.5,0},RGBColor[0,0,1]], Vector[{0,0},{0,2},RGBColor[0,0,1]]}; names=Graphics[{Text[FontForm[A,{"Helvetica-Bold",16}],{1.25,1}], Text[FontForm[Ax,{"Helvetica-Bold",16}],{1.25,0}], Text[FontForm[Ay,{"Helvetica-Bold",16}],{0,1}]}]; Show[lines,vecs,names,AspectRatio->Automatic]; :[font = text; inactive; preserveAspect; ] Yep! It's just a vector, A, with its x component, A¯ and its y component, A· . Think that was neat? Look at this. We can accomplish the same thing with one axis tied behind our back. :[font = input; preserveAspect; ] lines=Graphics[ GrayLevel[0.4], Line[{{2.5,.25},{2.75,.25},{2.75,0}}], PointSize[0.05],RGBColor[0,1,0],Point[{0,0}]]; vecs={Vector[{2.5,0},{5,0}], Vector[{0,0},{2.5,2},RGBColor[1,0,0]], Vector[{0,0},{2.5,0},RGBColor[0,0,1]], Vector[{2.5,0},{2.5,2},RGBColor[0,0,1]]}; names=Graphics[{Text[FontForm[A,{"Helvetica-Bold",16}],{1.25,1}], Text[FontForm["Ax",{"Helvetica-Bold",16}],{1.25,0}], Text[FontForm["Ay",{"Helvetica-Bold",16}],{2.5,1}], Text[FontForm["X",{"Helvetica-Bold",16}],{5.2,0}]}]; Show[lines,vecs,names,AspectRatio->Automatic, PlotRange->{{-1,5.5},{-1,2.5}}]; :[font = text; inactive; preserveAspect; ] And there's all we need to know: A is a vector we are given. It is the sum of the two vectors A¯ and A· which are perpendicular to each other, and A¯ points in the direction of the line determined by the vector, X. Of course, we know that we should call A¯ the component of A in the direction of X. :[font = subsubsection; inactive; preserveAspect; ] B.1.a) :[font = text; inactive; preserveAspect; ] Find the components, A¯ and A· given A and X. :[font = subsubsection; inactive; preserveAspect; ] Answer: It's simple if we think about it. Write down what we know: A = A¯ + A· . A¯ @A· = 0 (since these components are perpendicular to each other), and A¯ = t X for some real number, t. Shuffle this stuff and get A¯ = t X A· = A - t X A¯ @A· = t X@(A - tX) = 0. The last expression reduces to A@X = t X@X, or t = A@X/X@X :[font = subsubsection; inactive; preserveAspect; ] B.1.b) :[font = text; inactive; preserveAspect; ] Why do we insist that A¯ and A· be perpendicular? :[font = text; inactive; preserveAspect; endGroup; ] Answer: Why not? For one thing, that makes the tip of the vector A¯ the closest point to the tip of the vector, A, on the line determined by X. For another, think about Pythagoras. How can we recover the length of A from the lengths of A¯ and A· ? ;[s] 1:0,0;254,-1; 1:1,14,10,CalcMath,0,14,0,0,0; :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] B.2) The component of Y in the direction of a unit vector X. :[font = text; inactive; preserveAspect; ] Here is a unit vector: :[font = input; preserveAspect; ] X = {Cos[s],Sin[s]} :[font = text; inactive; preserveAspect; ] Check: :[font = input; preserveAspect; ] Expand[X.X,Trig->True] :[font = text; inactive; preserveAspect; ] Here is the vector Y = {1, 3} shown with the unit vector X = {Cos[¢Òä],Sin[¢Òä]}: :[font = input; preserveAspect; ] Y = {1,3}; X = {Cos[Pi/4],Sin[Pi/4]}; Clear[plot]; plot[1] = Show[Vector[{0,0}, X,RGBColor[0,0,1]], Graphics[Text["X", X/2]], Vector[{0,0},Y,RGBColor[1,0,0]], Graphics[Text["Y",Y/2]], AxesOrigin->{0,0},PlotRange->{{-3,3},{-3,3}}]; :[font = text; inactive; preserveAspect; ] Here is the vector Y shown with the component of Y in the direction of X: :[font = input; preserveAspect; ] t = X.Y/(X.X); plot[2] = Show[Vector[{0,0},t X,RGBColor[0,0,1]], Graphics[Text["Y's X component",t X/2]], Vector[{0,0},Y,RGBColor[1,0,0]], Graphics[Text["Y",Y/2]], AxesOrigin->{0,0},PlotRange->{{-3,3},{-3,3}}]; :[font = text; inactive; preserveAspect; ] Here they are ripe for a little movie: :[font = input; preserveAspect; ] Clear[k] Table[Show[plot[k]],{k,1,2}]; :[font = text; inactive; preserveAspect; ] Grab the second bracket from the left and press command-Y and then press 2 or 3. :[font = text; inactive; preserveAspect; ] Here is another vector Y shown with the a different vector X = {Cos[£Òç`],Sin[£Òç`]}: :[font = input; preserveAspect; ] Y = {0.8,2.8}; X = {Cos[2 Pi/3],Sin[2 Pi/3]}; Clear[plot]; plot[1] = Show[Vector[{0,0}, X,RGBColor[0,0,1]], Graphics[Text["X", X/2]], Vector[{0,0},Y,RGBColor[1,0,0]], Graphics[Text["Y",Y/2]], AxesOrigin->{0,0},PlotRange->{{-3,3},{-3,3}}]; :[font = text; inactive; preserveAspect; ] Here is the vector Y shown with the component of Y in the direction of X: :[font = input; preserveAspect; ] t = X.Y/(X.X); plot[2] = Show[Vector[{0,0},t X,RGBColor[0,0,1]], Graphics[Text["Y's X component",t X/2]], Vector[{0,0},Y,RGBColor[1,0,0]], Graphics[Text["Y",Y/2]], AxesOrigin->{0,0},PlotRange->{{-3,3},{-3,3}}]; :[font = text; inactive; preserveAspect; ] Here they are ripe for a little movie: :[font = input; preserveAspect; ] Clear[k] Table[Show[plot[k]],{k,1,2}]; :[font = text; inactive; preserveAspect; ] Grab the second bracket from the left and press command-Y and then press 3. Go back and change X and Y and rerun. :[font = subsubsection; inactive; preserveAspect; ] B.2.a) :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] What's a good way to think of the component of Y in the direction of X? :[font = subsubsection; inactive; preserveAspect; ] Answer: :[font = smalltext; inactive; preserveAspect; endGroup; ] Think of the component of Y in the direction of X as the amount of "push" Y has in the direction X is pointing. :[font = subsubsection; inactive; preserveAspect; ] B.2.b) :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] If Y is any vector and X is a unit vector, then why is the component of Y in the direction of X given by the clean formula (X @ Y) X? :[font = subsubsection; inactive; preserveAspect; ] Answer: :[font = smalltext; inactive; preserveAspect; ] Nice question with a nice answer. If X and Y are any vectors, then the component of Y in the direction of X is given by t X where t = (X @ Y)/(X @ X). Saying X is a unit vector is the same as saying X @ X = 1. Consequently if X is a unit vector the fancy formula for t collapses to t = (X @ Y)/1 = (X @ Y). Try it out: First note that X = {Cos[a], Sin[a]} is a unit vector no matter what a is because: :[font = input; preserveAspect; ] Clear[a] X = {Cos[a],Sin[a]}; Expand[X.X,Trig->True] :[font = smalltext; inactive; preserveAspect; ] Here are some pictures: of vectors Y and X = {Cos[a], Sin[a]} and the component of Y in the direction of X for some choices of a and Y: :[font = input; preserveAspect; ] a = 0.3; X = {Cos[a],Sin[a]}; Y = {3,4}; t = X.Y; Show[{Vector[{0,0}, X,RGBColor[0,0,1]], Graphics[Text[" X", X/2]]}, {Vector[{0,0},Y,RGBColor[1,0,0]], Graphics[Text["Y",Y/2]]}, AxesOrigin->{0,0},PlotLabel->"Y and X"]; :[font = smalltext; inactive; preserveAspect; ] Look at: :[font = input; preserveAspect; ] t = N[X.Y] :[font = smalltext; inactive; preserveAspect; ] The positive sign on t indicates that X and Y push together in the direction of X. :[font = input; preserveAspect; ] Show[{Vector[{0,0},t X,RGBColor[0,0,1]], Graphics[Text["Y's X component",t X/2]]}, {Vector[{0,0},Y,RGBColor[1,0,0]], Graphics[Text["Y",Y/2]]}, AxesOrigin->{0,0},PlotRange->All]; :[font = input; preserveAspect; ] a = 0.3; X = {Cos[a],Sin[a]}; Y = {-2,-5}; Show[Vector[{0,0}, X,RGBColor[0,0,1]], Graphics[Text[" X", X/2]], Vector[{0,0},Y,RGBColor[1,0,0]], Graphics[Text["Y",Y/2]], AxesOrigin->{0,0},PlotLabel->"Y and X"]; :[font = smalltext; inactive; preserveAspect; ] Look at: :[font = input; preserveAspect; ] t = N[X.Y] :[font = smalltext; inactive; preserveAspect; ] The negative sign on t indicates that Y pushes against X in the direction of X. :[font = input; preserveAspect; ] Show[Vector[{0,0}, X,RGBColor[0,1,0]], Graphics[Text["X", X/2]], Vector[{0,0},t X,RGBColor[0,0,1]], Graphics[Text["Y's X component",t X/2]], Vector[{0,0},Y,RGBColor[1,0,0]], Graphics[Text["Y",Y/2]], AxesOrigin->{0,0}]; :[font = smalltext; inactive; preserveAspect; endGroup; ] Run some more. It's pretty important to get a good feeling for components. :[font = subsubsection; inactive; preserveAspect; ] B.2.c) :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] If Y is any vector and X is a unit vector, then what is significance of the sign of X @ Y? :[font = subsubsection; inactive; preserveAspect; ] Answer: :[font = smalltext; inactive; preserveAspect; endGroup; ] A positive sign on X @ Y indicates that X and Y push together in the direction of X. A negative sign on X @ Y indicates that Y pushes against X in the direction of X. :[font = subsubsection; inactive; preserveAspect; ] B.2.d) :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] If Y is any vector and X is a unit vector, then what is the length of the component of Y in the direction of X? :[font = subsubsection; inactive; preserveAspect; ] Answer: :[font = smalltext; inactive; preserveAspect; endGroup; ] Because X is a unit vector, the length of X is 1. The component of Y in the direction of X is (X @ Y) X; so its length is |X @ Y|. :[font = subsubsection; inactive; preserveAspect; ] B.2.e) :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Does this work in 3 or more dimensions? :[font = subsubsection; inactive; preserveAspect; ] Answer: :[font = smalltext; inactive; preserveAspect; endGroup; endGroup; ] Yes. If X is a unit vector and Y is another vector , then the component of Y in the direction of X is just (X@Y) X. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] B.3) Vector fields and trajectories. :[font = subsubsection; inactive; preserveAspect; ] B.3.a) Vector fields :[font = text; inactive; preserveAspect; ] Take a function F[x,y] = {m[x,y], n[x,y]}. Notice that F[x,y] is a vector function of two variables. That means that for each point {x,y}, the value of the function F[x,y] is a Vector. Sometimes this kind of function is called a vector field. It is customary to visualize a vector field by plotting the vectors with tail at {x,y} and tip at {x,y} + F[x,y]. :[font = input; preserveAspect; ] Clear[F,m,n,x,y]; m[x_,y_] = 0.5 (y - 1); n[x_,y_] = 0.3 (x - 0.5); F[x_,y_] = {m[x,y],n[x,y]}; :[font = text; inactive; preserveAspect; ] Let's take a look at the vector field at the following points: :[font = input; preserveAspect; ] pointplot = Table[Graphics[{RGBColor[1,0,0],PointSize[0.015], Point[{x,y}]}],{x,-3,3},{y,-3,3}]; Show[pointplot, AxesOrigin->{0,0},AxesLabel->{"x","y"}]; :[font = text; inactive; preserveAspect; ] Here comes the plot of the vector field: :[font = input; preserveAspect; ] vectorfield = Table[Vector[{x,y},{x,y} + F[x,y]], {x,-3,3},{y,-3,3}]; Show[pointplot,vectorfield, AxesOrigin->{0,0},AspectRatio->Automatic, AxesLabel->{"x","y"}]; :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] What is a good way to interpret this plot? :[font = subsubsection; inactive; preserveAspect; ] Answer: :[font = smalltext; inactive; preserveAspect; ] Think of the whole x-y plane as water flowing with currents and eddies. _ The vectors represent the flow of water at their tails. _ The lengths of the vectors indicates the speed of the water flow at the tail. _ The directions of the vectors indicate the direction of the flow. In the plot above, some of the water is flowing off to the lower left and some of it is flowing off to the upper right. The water at the bottom is flowing faster than the water at the top. If you are only interested in the directions, then you can plot the unit vector field: :[font = input; preserveAspect; ] unitvectorfield = Table[ Vector[{x,y}, {x,y} + Simplify[.5 F[x,y]/Sqrt[F[x,y].F[x,y]]]], {x,-3,3},{y,-3,3}]; Show[pointplot,unitvectorfield, AxesOrigin->{0,0},AspectRatio->Automatic, AxesLabel->{"x","y"}]; :[font = smalltext; inactive; preserveAspect; endGroup; ] This shows the direction but not the speed of the flow over each plotted point. :[font = subsubsection; inactive; preserveAspect; ] B.3.b.i) Trajectories. :[font = text; inactive; preserveAspect; ] Look at the plot below: :[font = input; preserveAspect; ] Clear[F,x,y] F[x_,y_] = {x,- y}; {ax,bx} = {1.1,8.1}; {ay,by} = {-3.8,4.2}; unitfield = Table[Vector[{x,y},{x,y} + F[x,y]/Sqrt[F[x,y].F[x,y]]], {x,ax,bx},{y,ay,by}]; start = {1.3,4}; jump = 0.25; Clear[next,point,k] next[{x_,y_}] = {x,y} + jump F[x,y]; point[0] = start; point[k_] := point[k] = N[next[point[k-1]]]; iterations = 10; beginning = Graphics[{PointSize[0.03],RGBColor[1,0,0], Point[start]}]; trajectory = Graphics[{Thickness[0.01],RGBColor[1,0,0], Line[Table[point[k],{k,0,iterations}]]}]; Show[unitfield,beginning,trajectory ,AxesOrigin->{0,0}, AxesLabel->{"x","y"},AspectRatio->Automatic]; :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Describe what you see. :[font = subsubsection; inactive; preserveAspect; ] Answer: :[font = smalltext; inactive; preserveAspect; ] You see a vector field depicting water flowing from left to right with a decided attraction to the x-axis. The dot represents a cork dropped into the flowing water at the point: :[font = input; preserveAspect; ] start :[font = smalltext; inactive; preserveAspect; ] The curve represents an appoximation of what happens to this cork as it is carried off by the flow of the water. Let's see what happens when we pick a new point to place the cork: :[font = input; preserveAspect; ] start = {1,-3}; jump = 0.25; Clear[next,point,k] next[{x_,y_}] = N[{x,y} + jump F[x,y]]; point[0] = start; point[k_] := next[point[k-1]]; iterations = 10; beginning = Graphics[{PointSize[0.03],RGBColor[1,0,0], Point[start]}]; trajectory = Graphics[{Thickness[0.01],RGBColor[1,0,0], Line[Table[point[k],{k,0,iterations}]]}]; Show[unitfield,beginning,trajectory,AxesOrigin->{0,0}, AxesLabel->{"x","y"},AspectRatio->Automatic]; :[font = smalltext; inactive; preserveAspect; endGroup; ] Rerun choosing new places to start the cork on its trip. :[font = subsubsection; inactive; preserveAspect; ] B.3.b.ii) :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] How does the vector field F[x,y] govern the actual path of the cork? :[font = subsubsection; inactive; preserveAspect; ] Answer: :[font = smalltext; inactive; preserveAspect; ] If the cork finds itself at a position {x,y}, then it has to go with the flow. The flow at is in the direction of: :[font = input; preserveAspect; ] F[x,y] :[font = smalltext; inactive; preserveAspect; endGroup; ] To go with the flow, the cork must leave {x,y} in the direction of the vector {x,-y}. As the cork progresses, it corrects its direction instantaneously at each point to keep on the course that the flow determines. The effect is that if {x,y} is any point on the actual path of the cork, then the vector F[x,y] with its tail at {x,y} is tangent to the actual path of the cork. :[font = subsubsection; inactive; preserveAspect; ] B.3.b.iii) :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Ah-ha! The path shown above isn't the actual path but is an approximation to the actual path. What is the idea behind this approximation? :[font = subsubsection; inactive; preserveAspect; ] Answer: :[font = smalltext; inactive; preserveAspect; ] The fellow that had the idea for this type of approximation was the great Swiss mathematician L. Euler 1707-83. :[font = smalltext; inactive; preserveAspect; ] Euler enjoyed mathematics but he also enjoyed worldly pleasures and activities. He spent a lot of time in the company of Catherine the Great, empress of Russia 1762-96. Like Euler, Catherine led a very interesting life. :[font = smalltext; inactive; preserveAspect; ] Here is Euler's method for approximating the actual path of the cork: You set a starting point and a jump size: :[font = input; preserveAspect; ] start = {1,3} :[font = input; preserveAspect; ] jump = 0.3 :[font = input; preserveAspect; ] beginning = Graphics[{PointSize[0.03],RGBColor[1,0,0], Point[start]}] :[font = smalltext; inactive; preserveAspect; ] If you are at {x,y}, then you move alway from {x,y} in the direction dictated by the vector field F[x,y]: :[font = input; preserveAspect; ] Clear[next] next[{x_,y_}] = {x,y} + jump F[x,y] :[font = smalltext; inactive; preserveAspect; ] Then you iterate going from one point to the next: :[font = input; preserveAspect; ] Clear[point,k] point[0] = start; point[k_] := point[k] = N[next[point[k - 1]]]; :[font = smalltext; inactive; preserveAspect; ] The point[k_]:= point[k] notation here tells Mathematica to remember the the coordinates of each successive point as it is calculated. The N[] s hung around next[point[k - 1]]to keep the machine from bogging down with symbols. :[font = smalltext; inactive; preserveAspect; ] Then you make a table of points and plot them connecting a line segment from each point to the next one: :[font = input; preserveAspect; ] iterations = 5 :[font = input; preserveAspect; ] trajectory = Graphics[{Thickness[0.01],RGBColor[1,0,0], Line[Table[point[k],{k,0,iterations}]]}]; Show[unitfield,beginning,trajectory ,AxesOrigin->{0,0}, AxesLabel->{"x","y"},AspectRatio->Automatic]; :[font = smalltext; inactive; preserveAspect; ] To see more of the trajectory curve, you iterate more: :[font = input; preserveAspect; ] iterations = 10 :[font = input; preserveAspect; ] trajectory = Graphics[{Thickness[0.01],RGBColor[1,0,0], Line[Table[point[k],{k,0,iterations}]]}]; Show[unitfield,beginning,trajectory ,AxesOrigin->{0,0}, AxesLabel->{"x","y"},AspectRatio->Automatic]; :[font = smalltext; inactive; preserveAspect; endGroup; ] Play around with this remembering that Euler (pronounced "Oiler") was a smart fellow indeed. :[font = subsubsection; inactive; preserveAspect; ] B.3.b.iv) :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] What's the best way to screw this up? :[font = subsubsection; inactive; preserveAspect; ] Answer: :[font = smalltext; inactive; preserveAspect; ] This uses results from the previous parts. Make sure the previous parts are live on your machine. :[font = smalltext; inactive; preserveAspect; ] You want something resembling the actual path of the cork. The actual cork updates its direction instantaneously. But the approximation waits for a while to update the direction. As a result,the smaller the jump size, the more accurate the approximation. You can screw up things royally buy using too large a jump size: :[font = input; preserveAspect; ] start = {1,3} :[font = input; preserveAspect; ] jump = 2 :[font = input; preserveAspect; ] beginning = Graphics[{PointSize[0.03],RGBColor[1,0,0], Point[start]}]; Clear[next] next[{x_,y_}] = N[{x,y} + jump F[x,y]]; Clear[point,k]; point[0] = start; point[k_] := point[k] = next[point[k - 1]]; iterations = 8; trajectory = Graphics[{Thickness[0.01],RGBColor[1,0,0], Line[Table[point[k],{k,0,iterations}]]}]; Show[unitfield,beginning,trajectory ,AxesOrigin->{0,0}, AxesLabel->{"x","y"},AspectRatio->Automatic]; :[font = smalltext; inactive; preserveAspect; ] This is way off. To get a great approximation, you can use a small jump: :[font = input; preserveAspect; ] start = {1,3} :[font = input; preserveAspect; ] jump = 0.05 :[font = input; preserveAspect; ] beginning = Graphics[{PointSize[0.03],RGBColor[1,0,0], Point[start]}]; Clear[next] next[{x_,y_}] = N[{x,y} + jump F[x,y]]; Clear[point,k]; point[0] = start; point[k_] := point[k] = next[point[k - 1]]; iterations = 8; trajectory = Graphics[{Thickness[0.01],RGBColor[1,0,0], Line[Table[point[k],{k,0,iterations}]]}]; Show[unitfield,beginning,trajectory ,AxesOrigin->{0,0}, AxesLabel->{"x","y"},AspectRatio->Automatic]; :[font = smalltext; inactive; preserveAspect; ] But when you use a small jump, you have to do a lot of iterations: :[font = input; preserveAspect; ] start = {1,3} :[font = input; preserveAspect; ] jump = 0.05 :[font = input; preserveAspect; ] beginning = Graphics[{PointSize[0.03],RGBColor[1,0,0], Point[start]}]; Clear[next] next[{x_,y_}] = N[{x,y} + jump F[x,y]]; Clear[point,k]; point[0] = start; point[k_] := point[k] = next[point[k - 1]]; iterations = 50; trajectory = Graphics[{Thickness[0.01],RGBColor[1,0,0], Line[Table[point[k],{k,0,iterations}]]}]; Show[unitfield,beginning,trajectory ,AxesOrigin->{0,0}, AxesLabel->{"x","y"},AspectRatio->Automatic]; :[font = smalltext; inactive; preserveAspect; endGroup; endGroup; ] If you go with a small jump, then you'll need many iterations. This can be a problem for complicated functions. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] B.4) Flow of vector fields across curves and surfaces. :[font = subsubsection; inactive; preserveAspect; ] B.4.a) Flow of a vector field across a curve. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Describe the net flow across ellipse parameterized by P[t] = {5 Cos[t], 3 Sin[t]} with 0 ² t ² 2 ` of a fluid whose velocity is given by the vector field F[x,y] = {x - 1, y}. :[font = subsubsection; inactive; preserveAspect; ] Answer: :[font = smalltext; inactive; preserveAspect; ] Enter the vector field: :[font = input; preserveAspect; ] Clear[F,m,n,x,y] m[x_,y_] = (x - 1); n[x_,y_] = y; F[x_,y_] = {m[x,y],n[x,y]} :[font = smalltext; inactive; preserveAspect; ] Remember, the vector field is defined for all values of x and y, and doesn't even know there's a curve hanging around in the wings. Here is the curve: :[font = input; preserveAspect; ] Clear[t] x[t_] = 5 Cos[t]; y[t_] = 3 Sin[t]; curveplot = ParametricPlot[{x[t],y[t]},{t,0,2 Pi}, PlotStyle->{{RGBColor[1,0,0],Thickness[0.009]}}, AspectRatio->Automatic]; :[font = smalltext; inactive; preserveAspect; ] We want to know what's happening to the flow right on the curve. Let's just look at the flow vectors right on the curve. That is, we will just look at the flow vectors F[x,y] for {x,y} = {x[t],y[t]}. :[font = input; preserveAspect; ] jump = Pi/8; fieldvectors = Table[Vector[N[{x[t],y[t]}], N[{x[t],y[t]} + F[x[t],y[t]]]], {t,0, 2 Pi - jump,jump}]; Show[curveplot,fieldvectors,AxesOrigin->{0,0}, AspectRatio->Automatic,AxesLabel->{"x","y"}]; :[font = smalltext; inactive; preserveAspect; endGroup; ] These vectors indicate the direction and the speed of the flow on the curve at the tails of the vectors. There must be a heck of a pump inside that ellipse because the flow is definitely from the inside to the outside. :[font = subsubsection; inactive; preserveAspect; ] B.4.b) Analyzing the flow across a curve by looking at normal components of the flow. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Describe the net flow across the circle of radius 2 centered at {2,1} of a fluid whose velocity is given by the vector field F[x,y] = {x + y, x}. :[font = subsubsection; inactive; preserveAspect; ] Answer: :[font = smalltext; inactive; preserveAspect; ] Enter the vector field: :[font = input; preserveAspect; ] Clear[F,m,n,x,y] m[x_,y_] = x + y; n[x_,y_] = x; F[x_,y_] = {m[x,y],n[x,y]} :[font = smalltext; inactive; preserveAspect; ] Here is the circle shown with a selection of the field vectors whose tails are on the curve: :[font = input; preserveAspect; ] Clear[t] {x[t_],y[t_]} = {2,1} + 2 {Cos[t],Sin[t]}; curveplot = ParametricPlot[{x[t],y[t]},{t,0,2 Pi}, PlotStyle->{{RGBColor[1,0,0],Thickness[0.009]}}, AspectRatio->Automatic,DisplayFunction->Identity]; jump = Pi/8; fieldvectors = Table[Vector[N[{x[t],y[t]}], N[{x[t],y[t]} + F[x[t],y[t]]]], {t,0, 2 Pi - jump,jump}]; Show[curveplot,fieldvectors,AxesOrigin->{0,0}, AspectRatio->Automatic,AxesLabel->{"x","y"}, DisplayFunction->$DisplayFunction]; :[font = smalltext; inactive; preserveAspect; ] These vectors indicate the direction and the speed of the flow on the curve at the tails of the vectors. Over most of the circle, the flow seems to be from outside to inside, but there is strong flow from inside to outside on the upper right. :[font = smalltext; inactive; preserveAspect; ] On the upper left and lower right, a lot of the flow is dribbling around the boundary; so for getting an idea of the actual flow across the curve,their lengths may be somewhat misleading. The actual flow across the curve is measured by the components of these vectors perpendicular to the curve. At a point {x[t], y[t]} on the curve, the vector {x'[t], y'[t]} is tangent to the curve and the vector normal[t]={y'[t], -x'[t]} is perpendicular to the curve because: :[font = input; preserveAspect; ] normal[t_] = {y'[t],-x'[t]}; Expand[{x'[t],y'[t]}.normal[t]] :[font = smalltext; inactive; preserveAspect; ] The unit vector pointing in the same perpendicular direction as normal[t] is {y'[t],-x'[t]}/Î{ãyã'ã[ãtã]ã,ã-ãxã'ã[ãtã]ã}ã@ã{ãyã'ã[ãtã]ã,ã-ãxã'ã[ãtã]ã}. This is given by: :[font = input; Cclosed; preserveAspect; startGroup; ] Clear[unitnormal] unitnormal[t_] = Simplify[Expand[ normal[t]/Sqrt[normal[t].normal[t]],Trig->True]] :[font = smalltext; inactive; preserveAspect; ] Here comes the plot of the normal components of the field vectors plotted above: :[font = input; preserveAspect; endGroup; ] Clear[normcomp] normcomp[t_] = (F[x[t],y[t]].unitnormal[t]) unitnormal[t]; actualflow = Table[Vector[{x[t],y[t]},{x[t],y[t]} + normcomp[t],RGBColor[0,0,1]], {t,0, 2 Pi - jump,jump}]; Show[curveplot,actualflow,AxesOrigin->{0,0}, AspectRatio->Automatic,AxesLabel->{"x","y"}, DisplayFunction->$DisplayFunction]; :[font = smalltext; inactive; preserveAspect; endGroup; ] The length of each of these normal components of the flow measures the actual flow across the curve at the point at which the vector's tail is anchored. Over most of the circle, the flow is from outside to inside, but the key is the length of the inside to outside vectors at the upper left. It's a judgement call, but you've got to say that the net flow is from inside to outside. :[font = subsubsection; inactive; preserveAspect; ] B.4.c) Why just look at the normal component? :[font = text; inactive; preserveAspect; ] Why is it that the rate at which fluid leaves or enters a region at a point on the boundary is proportional to the normal component of the fluid's velocity vector at that point? Why isn't it just proportional to the size of the velocity vector itself? :[font = subsubsection; inactive; preserveAspect; ] Answer: Let's look at some snapshots. First, here's a nice elliptical region. :[font = input; preserveAspect; ] box[p_,w_,g_] := Graphics[{Thickness[0.008],GrayLevel[g], Line[{p+{-w,-w},p+{-w,w},p+{w,w},p+{w,-w},p+{-w,-w}}], Line[{p+{-w,0},p+{w,0}}] }]; boundary = Graphics[{Thickness[0.008],RGBColor[1,0,0], Line[{{-2,0},{2,0}}]}]; region = ParametricPlot[{4Cos[t],2Sin[t]},{t,-Pi,Pi}, PlotStyle->RGBColor[1,0,0], AspectRatio->Automatic]; :[font = text; inactive; preserveAspect; ] Now look at the region with a little gray chunk of fluid at its top point. :[font = input; preserveAspect; ] Show[region,box[{0,2},.5,.4]]; :[font = text; inactive; preserveAspect; ] Let's draw that same picture with a possible velocity field vector attached at the center of the box of fluid. ;[s] 1:0,0;110,-1; 1:1,14,10,CalcMath,0,14,0,0,0; :[font = input; preserveAspect; ] velocity={1,3}; vel = Vector[{0,2},{0,2}+velocity,Thickness[0.007], RGBColor[0,.5,.7]]; Show[region,box[{0,2},.5,.4],vel]; :[font = text; inactive; preserveAspect; ] If we look at where the box moves to in a short time, delta, we might see something like this: ;[s] 1:0,0;94,-1; 1:1,14,10,CalcMath,0,14,0,0,0; :[font = input; preserveAspect; ] delta=.1; Show[region,vel,box[{0,2}+ delta velocity,.5,.2]]; :[font = text; inactive; preserveAspect; ] We can see that the amount of fluid which actually left the region is the part above the boundary of the region and below the gray line that used to lie on the boundary. It ain't easy to see how much left in this scale, so let's move in on this beast and see what we see. First, the box of water in its original position. (Scaling change for artistic merit.) ;[s] 1:0,0;361,-1; 1:1,14,10,CalcMath,0,14,0,0,0; :[font = input; preserveAspect; ] velocity={1,2}; Show[box[{0,0},1,.4],boundary, Vector[{0,0},velocity, Thickness[0.008],RGBColor[0,.5,.7]], AspectRatio->Automatic]; :[font = text; inactive; preserveAspect; ] Now let's see where the box is a little bit later. ;[s] 1:0,0;50,-1; 1:1,14,10,CalcMath,0,14,0,0,0; :[font = input; preserveAspect; ] velocity={1,2}; Show[boundary,Vector[{0,0},velocity, Thickness[0.008],RGBColor[0,.5,.7]], box[.3 velocity,1,.2], AspectRatio->Automatic]; :[font = text; inactive; preserveAspect; ] The amount of water that left is just the part of the box below its middle horizontal line and the boundary of the region. I think it would be easier to see how much that is if we put in the vector from the original center of the box to the center now, together with its tangential and normal components. Here it is. ;[s] 1:0,0;318,-1; 1:1,14,10,CalcMath,0,14,0,0,0; :[font = input; preserveAspect; ] Show[boundary, (*Vector[{0,0},velocity, Thickness[0.008],RGBColor[0,.5,.7]],*) Vector[{0,0},.3 velocity, Thickness[0.009],RGBColor[0,0,1]], Vector[{0,0},.3 {1,0}, Thickness[0.009]], Vector[{0,0},.3 {0,2}, Thickness[0.009]], box[.3 velocity,1,.2], Graphics[Text["Fn",{-.2,.3}]], Graphics[Text["Fd",{.35,.3}]], Graphics[Text["ds",{.25,-.3}]], AspectRatio->Automatic]; :[font = text; inactive; preserveAspect; ] No doubt now. The amount that is outside that used to be inside is just || Fn || * ds, the length of the base. In this case, that is just F@(delta n) * ds. That's right. The rate at which the fluid is leaving at a given point is just the dot product of the velocity field with the unit outward normal vector at that point. What's the rest of the velocity field measuring? ;[s] 1:0,0;379,-1; 1:1,14,10,CalcMath,0,14,0,0,0; :[font = subsubsection; inactive; preserveAspect; ] B.4.c) Three dimensions. :[font = text; inactive; preserveAspect; ] Here is a vector field in three dimensions plotted at the indicated points: :[font = input; preserveAspect; ] Clear[F,x,y,z] F[x_,y_,z_] = {(-1 - x)/3, (-1 - y)/3, (2 - z)/3}; :[font = input; preserveAspect; ] points = Table[Graphics3D[{RGBColor[0,0,1],PointSize[0.015], Point[{x,y,z}]}],{x,-2,2,2}, {y,-2,2,2},{z,-3,3,2}]; coordinateaxes = {Graphics3D[Line[{{-1,0,0},{1,0,0}}]], Graphics3D[Line[{{0,-1,0},{0,1,0}}]], Graphics3D[Line[{{0,0,-1},{0,0,1}}]]}; Show[coordinateaxes,points, ViewPoint->{2.747, 1.594, 1.168}, PlotRange->All]; :[font = text; inactive; preserveAspect; ] Here comes the plot of the field vectors with tails at the points plotted above: :[font = input; preserveAspect; ] vectorfield = Table[Vector[N[{x,y,z}],N[{x,y,z} + F[x,y,z]]], {x,-2,2,2}, {y,-2,2,2},{z,-3,3,2}]; Show[coordinateaxes,points,vectorfield, ViewPoint->{2.747, 1.594, 1.168}, PlotRange->All]; :[font = text; inactive; preserveAspect; ] The flow is headed for the point {-1,-1,2}: :[font = input; preserveAspect; ] attractor = {-1,-1,2}; attractingpoint = Graphics3D[{RGBColor[1,0,0],PointSize[0.06], Point[attractor]}]; Show[attractingpoint,coordinateaxes, points,vectorfield, ViewPoint->{2.747, 1.594, 1.168}, PlotRange->All]; :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Describe the net flow of this vector field across any small sphere centered at this attracting point. :[font = subsubsection; inactive; preserveAspect; ] Answer: :[font = smalltext; inactive; preserveAspect; endGroup; endGroup; endGroup; ] The net flow across any small sphere centered at this attracting point is from outside to inside. :[font = section; inactive; Cclosed; preserveAspect; startGroup; ] Tutorials :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] T.1) Tangential and normal components of acceleration in two and three dimensions. :[font = subsubsection; inactive; preserveAspect; ] T.1.a) :[font = text; inactive; preserveAspect; ] At time t, an object is at the location P[t] = {x[t], y[t]}. :[font = input; preserveAspect; ] Clear[t,x,y,P] P[t_] = {x[t],y[t]} :[font = text; inactive; preserveAspect; ] The velocity of the object at time t is given by: :[font = input; preserveAspect; ] Clear[vel] vel[t_] = D[P[t],t] :[font = text; inactive; preserveAspect; ] Velocity is just the instantaneous rate of change of position. :[font = input; preserveAspect; ] Clear[accel] accel[t_] = D[vel[t],t] :[font = text; inactive; preserveAspect; ] Acceleration is no more mysteroius than velocity; it is just the instantaneous rate of change of the velocity. :[font = subsubsection; inactive; preserveAspect; ] T.1.a) Two dimensions. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] For P[t] = {7 Cos[t], 4 Sin[t]}, plot in true scale the motion of the object for 0 ² t ² 2` including several velocity vectors. Then on a separate plot show in true scale the motion of the object for 0 ² t ² 2` including several tangential components of acceleration. On a third plot, show in true scale the motion of the object for 0 ² t ² 2` including several tangential and normal components of acceleration Discuss what each plot reveals. :[font = subsubsection; inactive; preserveAspect; ] Answer: :[font = smalltext; inactive; preserveAspect; ] Here's the path: :[font = input; preserveAspect; ] Clear[t,P,x,y] x[t_] = 9 Cos[t]; y[t_] = 4 Sin[t]; P[t_] = {x[t],y[t]}; curveplot = ParametricPlot[P[t],{t,0,2 Pi}, PlotStyle->Thickness[0.007], AspectRatio->Automatic]; :[font = smalltext; inactive; preserveAspect; ] The object is moving on an ellipse. Here come some velocity vectors: :[font = input; preserveAspect; ] Clear[vel,accel] vel[t_] = D[P[t],t] :[font = input; preserveAspect; ] velvectors = Table[Vector[P[t], P[t] + vel[t], RGBColor[0,0,1]],{t,0,2 Pi,Pi/6}]; velocities = Show[curveplot,velvectors, AspectRatio->Automatic,PlotRange->All]; :[font = smalltext; inactive; preserveAspect; ] The motion is counterclockwise. The object is going fast on the wide turns but slowing down a bit for the sharp turns at the left and right. Now let's see the tangential components of the acceleration vectors: :[font = input; preserveAspect; ] accel[t_] = D[vel[t],t] Clear[unittan] unittan[t_] = vel[t]/Sqrt[vel[t].vel[t]]; tancompaccel[t_] = (unittan[t].accel[t]) unittan[t]; acceltancomps = Table[Vector[P[t], P[t] + tancompaccel[t], RGBColor[1,0,0]],{t,0,2 Pi,Pi/6}]; Show[curveplot,velvectors,acceltancomps, AspectRatio->Automatic,PlotRange->All]; :[font = smalltext; inactive; preserveAspect; ] Cool plot. The tangential components of the acceleration push in the direction of the motion when the object is gaining speed and they push against the the direction of motion when th object is slowing down. Just like the gas pedal and the brakes on a car. Now let's bring in the normal components of the acceleration. They are very easy to calculate because the acceleration is the sum of its tangential and normal components. :[font = smalltext; inactive; preserveAspect; ] This saves you the trouble of calculating the normal vectors. :[font = input; preserveAspect; ] normalcompaccel[t_] = accel[t] - tancompaccel[t]; accelnormalcomps = Table[Vector[P[t], P[t] + normalcompaccel[t], RGBColor[1,0,0]],{t,0,2 Pi,Pi/6}]; Show[curveplot,velvectors, acceltancomps,accelnormalcomps, AspectRatio->Automatic,PlotRange->All]; :[font = smalltext; inactive; preserveAspect; endGroup; ] The normal components of acceleration represent the tug on the object as it makes its turns. This plot shows that the sharper the turn,the greater the tug. :[font = subsubsection; inactive; preserveAspect; ] T.1.b) Three dimensions. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] For P[t] = {Cos[1.5 t], t, Sin[t]}, plot in true scale the motion of the object for 0 ² t ² 2` including several velocity vectors. Then on a separate plot show in true scale the motion of the object for 0 ² t ² 2` including several tangential components of acceleration. On a third plot, show in true scale the motion of the object for 0 ² t ² 2 ` including several tangential and normal components of acceleration Discuss what each plot reveals. :[font = subsubsection; inactive; preserveAspect; ] Answer: :[font = smalltext; inactive; preserveAspect; ] This was done by cutting, pasting and editing part a). Here's the path: :[font = input; preserveAspect; ] Clear[t,P,x,y] x[t_] = Cos[1.5 t]; y[t_] = t; z[t_] = Sin[t]; P[t_] = {x[t],y[t],z[t]}; curveplot = ParametricPlot3D[Release[P[t]],{t,0,2 Pi,Pi/16}, DisplayFunction->Identity]; h = 0.5; coordinateaxes = {Graphics3D[Line[{{-h,0,0},{h,0,0}}]], Graphics3D[Line[{{0,-h,0},{0,h,0}}]], Graphics3D[Line[{{0,0,-h},{0,0,h}}]]}; Show[coordinateaxes,curveplot, ViewPoint->{2.747, 1.594, 1.168}, PlotRange->All,DisplayFunction->$DisplayFunction]; :[font = smalltext; inactive; preserveAspect; ] Here come some velocity vectors: :[font = input; preserveAspect; ] Clear[vel,accel] vel[t_] = D[P[t],t] :[font = input; preserveAspect; ] jump = 6/7; velvectors = Table[Vector[N[P[t]], N[P[t] + vel[t]]], {t,jump, 6 - jump,jump}]; Show[coordinateaxes,curveplot,velvectors, ViewPoint->{2.747, 1.594, 1.168}, PlotRange->All,DisplayFunction->$DisplayFunction]; :[font = smalltext; inactive; preserveAspect; ] This time it's hard to tell what's happening. Now let's see the tangential components of the acceleration vectors: :[font = input; preserveAspect; ] accel[t_] = D[vel[t],t] :[font = input; preserveAspect; ] Clear[unittan] unittan[t_] = vel[t]/Sqrt[vel[t].vel[t]] :[font = input; preserveAspect; ] tancompaccel[t_] = (unittan[t].accel[t]) unittan[t] :[font = input; preserveAspect; ] acceltancomps = Table[Vector[N[P[t]], N[P[t] + tancompaccel[t]], RGBColor[1,0,0]], {t,jump, 6 - jump,jump}]; Show[coordinateaxes,curveplot,velvectors,acceltancomps, ViewPoint->{2.747, 1.594, 1.168}, PlotRange->All,DisplayFunction->$DisplayFunction]; :[font = smalltext; inactive; preserveAspect; ] The tangential components of the acceleration push in the direction of the motion when the object is gaining speed and they push against the the direction of motion when th object is slowing down. Just like the gas pedal and the brakes on a car. The brakes are on when the object goes into the turn on the left, but otherwise, the gas pedal is down. Now let's bring in the normal components of the acceleration. They are very easy to calculate because the acceleration is the sum of its tangential and normal components. :[font = smalltext; inactive; preserveAspect; ] This saves you the trouble of calculating the normal vectors. :[font = input; preserveAspect; ] normalcompaccel[t_] = accel[t] - tancompaccel[t]; accelnormalcomps = Table[Vector[N[P[t]], N[P[t] + normalcompaccel[t]], RGBColor[0,0,1]], {t,jump, 6 - jump,jump}]; Show[coordinateaxes,curveplot,velvectors, acceltancomps,accelnormalcomps, ViewPoint->{2.747, 1.594, 1.168}, PlotRange->All,DisplayFunction->$DisplayFunction]; :[font = smalltext; inactive; preserveAspect; endGroup; endGroup; ] The normal components of acceleration represent the tug on the object as it makes its turns. This plot shows that the sharper the turn,the greater the tug. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] T.2) Trajectories in three dimensions. :[font = text; inactive; preserveAspect; ] Here is a three dimensional vector field: :[font = input; preserveAspect; ] Clear[F,x,y,z] F[x_,y_,z_] = { -2 x + 4.6,- y, -z} :[font = text; inactive; preserveAspect; ] We'll plot it at these points: :[font = input; preserveAspect; ] points = Table[Graphics3D[{RGBColor[0,0,1],PointSize[0.015], Point[{x,y,z}]}],{x,1,4}, {y,-2,2,2},{z,-3,3,2}]; coordinateaxes = {Graphics3D[Line[{{-1,0,0},{1,0,0}}]], Graphics3D[Line[{{0,-1,0},{0,1,0}}]], Graphics3D[Line[{{0,0,-1},{0,0,1}}]]}; Show[coordinateaxes,points, ViewPoint->{2.747, 1.594, 1.168}, PlotRange->All]; :[font = text; inactive; preserveAspect; ] Here's a plot of the unit vector field: :[font = input; preserveAspect; ] unitfield = Table[Vector[N[{x,y,z}], N[{x,y,z} + F[x,y,z]/Sqrt[F[x,y,z].F[x,y,z]]]], {x,1,4},{y,-2,2,2},{z,-3,3,2}]; Show[coordinateaxes,points,unitfield, ViewPoint->{2.747, 1.594, 1.168}, Axes->Automatic, PlotRange->All]; :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] There must be something mighty interesting in there. Plot a couple of trajectories and see where they go. :[font = subsubsection; inactive; preserveAspect; ] Answer: :[font = smalltext; inactive; preserveAspect; ] Take the code for Euler's method in two dimensions and copy, paste and adapt it to to three dimensions. :[font = input; preserveAspect; ] start = {3,2,-3}; jump = 0.5; Clear[next,point,k]; next[{x_,y_,z_}] = {x,y,z} + jump F[x,y,z]; point[0] = start; point[k_] := point[k] = N[next[point[k-1]]]; iterations = 12; beginning = Graphics3D[{PointSize[0.03],Point[start]}]; firsttrajectory = Graphics3D[{RGBColor[1,0,0],Thickness[0.01], Line[Table[point[k],{k,0,iterations}]]}]; Show[unitfield,coordinateaxes,beginning, firsttrajectory, Axes->Automatic,ViewPoint->{2.747, 1.594, 1.168}, PlotRange->All]; :[font = smalltext; inactive; preserveAspect; ] Go for another trajectory and compare it with the first t: :[font = input; preserveAspect; ] start = {3,-2,-3}; jump = 0.5; Clear[next,point,k] next[{x_,y_,z_}] = {x,y,z} + jump F[x,y,z ]; point[0] = start; point[k_] := point[k] = N[next[point[k-1]]]; iterations = 12; beginning = Graphics3D[{PointSize[0.03],Point[start]}]; secondtrajectory = Graphics3D[{RGBColor[1,0,0],Thickness[0.01], Line[Table[point[k],{k,0,iterations}]]}]; Show[unitfield,coordinateaxes,beginning, firsttrajectory,secondtrajectory, Axes->Automatic, ViewPoint->{2.747, 1.594, 1.168}, PlotRange->All]; :[font = smalltext; inactive; preserveAspect; ] Both trajectories were sucked into the same spot. Check where the second trajectory stopped: :[font = input; preserveAspect; ] point[12] :[font = smalltext; inactive; preserveAspect; ] This is close to: :[font = input; preserveAspect; ] attractor = {2.3,0,0}; attractingpoint = Graphics3D[{RGBColor[1,0,0],PointSize[0.05], Point[attractor]}]; Show[unitfield,coordinateaxes,beginning, firsttrajectory,secondtrajectory, attractingpoint, Axes->Automatic, ViewPoint->{2.747, 1.594, 1.168}, PlotRange->All]; :[font = smalltext; inactive; preserveAspect; endGroup; endGroup; ] Looks good and feels good. You might want to check whether other trajectories head toward this attractor. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] T.3) The electric field. :[font = text; inactive; preserveAspect; ] In the electric interpretation, a vector field F[x,y] = {m[x,y],n[x,y]} is a vector such that F[x,y]@U measures the instantantaneous voltage drop when you leave {x,y} in the direction of a unit vector U. Another way of saying it is that it represents the force the field places on a unit charge at the point {x,y}. :[font = subsubsection; inactive; preserveAspect; ] T.3.a) :[font = text; inactive; preserveAspect; ] Here is the plot of a electric field corresponding to a point charge of size 2 at {0.50,1.50}: :[font = input; preserveAspect; ] Clear[F,x,y] q = 2; {a,b} = {0.50,1.50}; F[x_,y_] = q {x - a,y - b}/((x - a)^2 + (y - b)^2)^(3/2) :[font = input; preserveAspect; ] Show[Graphics[PointSize[0.08],Point[{a,b}]], Table[Vector[{x,y},{x,y} + F[x,y], RGBColor[1,0,0]], {x,-1,3},{y,0,4}],Axes->Automatic]; :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] How do you interpret this plot? :[font = subsubsection; inactive; preserveAspect; ] Answer: :[font = text; inactive; preserveAspect; endGroup; ] Interpretation: Near {a,b} = {0.75,2.0}, the voltage drop is large and tapers off as you get farther and farther from the position {a,b} of the point charge. Reason: If you leave {x,y} in the direction of a unit vector U, then the instantaneous voltage drop is F[x,y]@U = ||F[x,y]|| ||U|| Cos[angle between] = ||F[x,y]|| Cos[angle between] because ||U|| = 1. So the instantaneous voltage drop is as big as possible when F[x,y]@U = ||F[x,y]|| Cos[angle between] is as big as possible. This happens when Cos[angle between] = 1 which is to say that angle between = 0. Thus to get the biggest instantaneous voltage drop, you take U = F[x,y]/||F[x,y]||. The direction of the biggest instantaneous voltage drop is the direction of F[x,y]. The size of the biggest instantaneous voltage drop is F[x,y]@F[x,y]/||F[x,y]|| = ||F[x,y]||ç/||F[x,y]|| = ||F[x,y]||. This means that F[x,y] points in the direction of the biggest instantaneous voltage drop and that the instantaneous voltage drop is ||F[x,y|| in this direction. Thus, in the plot above,the vectors point in the direction of the greatest instantaneous voltage drop and their lengths indicate the size of the greatest instantaneous voltage drop. :[font = subsection; inactive; preserveAspect; ] T.3.b) :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Why the presence of the funny exponent “Òè in the formula for the electric field corresponding to a charge of size q at {a,b}? :[font = subsubsection; inactive; preserveAspect; ] Answer: :[font = smalltext; inactive; preserveAspect; ] The formula is: :[font = input; preserveAspect; ] Clear[F,a,b,q,x,y] F[x_,y_] = q {x - a,y - b}/((x - a)^2 + (y - b)^2)^(3/2) :[font = smalltext; inactive; preserveAspect; ] Coulomb's law says that the size, ||F[x,y]||, of the biggest instantaneous voltage drop F[x,y] at {x,y} is proportional to 1/(distance from {a,b} to {x,y})ç. Let's check this out. Here is ||F[x,y]||: :[font = input; preserveAspect; ] voltagedropsize = Sqrt[Together[F[x,y].F[x,y]]] :[font = smalltext; inactive; preserveAspect; ] here is 1/(distance from {a,b} to {x,y})ç: :[font = input; preserveAspect; ] distance = Sqrt[Expand[({x,y} - {a,b}).({x,y} - {a,b})]]; 1/(distance^2) :[font = smalltext; inactive; preserveAspect; endGroup; ] This checks because this tells us that ||F[x,y]|| is a constant multiple of 1/(distance from {a,b} to {x,y})ç. Mr. Coulomb is happy and so are we. :[font = subsection; inactive; preserveAspect; ] T.3.c) :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] What do you get when you put a charge of size 1.5 at {-0.875,0.375} and a charge of size -1.5 at {0.875,0.375}? :[font = subsubsection; inactive; preserveAspect; ] Answer: :[font = smalltext; inactive; preserveAspect; ] You add: :[font = input; preserveAspect; ] Clear[F1,F2,x,y] q1 = 1.5; {a1,b1} = {-0.875,0.375}; F1[x_,y_] = q1 {x - a1,y - b1}/((x - a1)^2 + (y - b1)^2)^(3/2); q2 = -1.5; {a2,b2} = {0.875,0.375}; F2[x_,y_] = q2 {x - a2,y - b2}/((x - a2)^2 + (y - b2)^2)^(3/2); Show[Graphics[{RGBColor[1,0,0],PointSize[0.08], Point[{a1,b1}]}], Graphics[{RGBColor[0,0,1],PointSize[0.08], Point[{a2,b2}]}], Table[Vector[{x,y},{x,y} + F1[x,y] + F2[x,y],RGBColor[1,0,0]], {x,-3,3},{y,-2,4}],Axes->Automatic]; :[font = smalltext; inactive; preserveAspect; ] That's a little hard to interpret. Maybe we ought to look at the unit electric field which shows the direction of greatest intantaneous voltage drop but does not show the size of the drop. :[font = input; preserveAspect; ] Clear[unitfieldvector] unitfieldvector[x_,y_] = (F1[x,y] + F2[x,y])/ Sqrt[(F1[x,y] + F2[x,y]).(F1[x,y] + F2[x,y])]; Show[Graphics[{RGBColor[1,0,0],PointSize[0.08], Point[{a1,b1}]}], Graphics[{RGBColor[0,0,1],PointSize[0.08], Point[{a2,b2}]}], Table[Vector[{x,y},{x,y} + unitfieldvector[x,y],RGBColor[1,0,0]], {x,-3,3,0.5},{y,-2,4,0.5}],Axes->Automatic]; :[font = smalltext; inactive; preserveAspect; endGroup; ] Very hot plot. Well worth waiting for. The juice is pouring away from the positive charge toward the negative charge. :[font = subsubsection; inactive; preserveAspect; ] T.3.d) :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] What happens in three dimensions? :[font = subsubsection; inactive; preserveAspect; ] Answer: :[font = smalltext; inactive; preserveAspect; ] For a charge of size q at {a,b,c}, use: :[font = input; preserveAspect; ] Clear[F,a,b,c,q,x,y,z] F[x_,y_] = q {x - a,y - b,z - c}/ ((x - a)^2 + (y - b)^2 + (z - c)^2)^(3/2) :[font = smalltext; inactive; preserveAspect; ] Here is a plot of the electric field with opposite but equally powerful point charges at {1.5,0,0} and {-1.5,0,0}: :[font = smalltext; inactive; preserveAspect; ] This will take a while on all but the fastest machines. :[font = input; preserveAspect; ] Clear[F1,F2,x,y,z] q1 = 1; {a1,b1,c1} = {1.5,0,0}; F1[x_,y_,z_] = q1 {x - a1,y - b1,z - c1}/ ((x - a1)^2 + (y - b1)^2 + (z - c1)^2)^(3/2) :[font = input; preserveAspect; ] q2 = -1; {a2,b2,c2} = {-1.5,0,0}; F2[x_,y_,z_] = q2 {x - a2,y - b2,z - c2}/ ((x - a2)^2 + (y - b2)^2 + (z - c2)^2)^(3/2) :[font = input; preserveAspect; ] Clear[field] field[x_,y_,z_] = (F1[x,y,z] + F2[x,y,z]); scalefactor = 20; scaledfieldvectors = Table[Vector[N[{x,y,z}], N[{x,y,z} + scalefactor field[x,y,z]]], {x,-3,3,3},{y,-3,3,2},{z,-3,3,2}]; coordinateaxes = {Graphics3D[Line[{{-4,0,0},{4,0,0}}]], Graphics3D[Line[{{0,-2,0},{0,2,0}}]], Graphics3D[Line[{{0,0,-2},{0,0,2}}]]}; fieldplot = Show[coordinateaxes, Graphics3D[{RGBColor[1,0,0],PointSize[0.08], Point[{a1,b1,c1}]}], Graphics3D[{RGBColor[0,0,1],PointSize[0.08], Point[{a2,b2,c2}]}], scaledfieldvectors, ViewPoint->{2.747, 1.594, 1.168}, Axes->Automatic, PlotRange->All]; :[font = smalltext; inactive; preserveAspect; ] The juice is running from the positive charge on the positive x-axis to the negative charge on the negative x-axis. :[font = smalltext; inactive; preserveAspect; ] This plot was scaled by plotting the field vectors twenty times longer than they actually are. All the better to see them, my dear. A unit vector plot is theoretically possible but would take a very long time to run because (F1[x,y,z] + F2[x,y,z])/ Î(ãFã1ã[ãxã,ãyã,ãzã]ã ã+ã ãFã2ã[ãxã,ãyã,ãzã]ã)ã@ã(ãFã1ã[ãxã,ãyã,ãzã]ã ã+ã ãFã2ã[ãxã,ãyã,ãzã]ã) is a mess to evaluate. :[font = smalltext; inactive; preserveAspect; ] Here is the same plot from a couple of different view points: :[font = input; preserveAspect; ] Show[fieldplot,ViewPoint->{3.534, 4.179, 7.304}]; :[font = smalltext; inactive; preserveAspect; ] Again, the juice is running from the positive charge to the negative charge. :[font = input; preserveAspect; ] Show[fieldplot,ViewPoint->{9,0,0}]; :[font = smalltext; inactive; preserveAspect; endGroup; endGroup; ] This takes the positive viewpoint. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] T.4) Tips on plotting vector fields. :[font = text; inactive; preserveAspect; ] To get a good visualization of a vector field you can plot the field as it comes: :[font = input; preserveAspect; ] Clear[F,x,y] F[x_,y_] = {x^2,y^2} :[font = input; preserveAspect; ] fieldplot = Table[Vector[{x,y},{x,y} + F[x,y],RGBColor[0,0,1]], {x,-3,3,0.5},{y,-3,3,0.5}]; Show[fieldplot,Axes->Automatic]; :[font = text; inactive; preserveAspect; ] In some cases, such as this one, the vectors plot out so long that you have a hard time visualizing the flow of the field. Other times, the field vectors might plot out so short that you can't see them clearly. In these cases, you might want to apply a scale factor: :[font = input; preserveAspect; ] scalefactor = 0.1 scaledfieldplot = Table[Vector[{x,y},{x,y} + scalefactor F[x,y],RGBColor[0,0,1]], {x,-3,3,0.5},{y,-3,3,0.5}]; Show[scaledfieldplot,Axes->Automatic]; :[font = text; inactive; preserveAspect; ] In a scaled plot such as this one, the lengths of the vectors are proportional to the speed of the flow, just as they were in the unscaled plot. Sometimes you can't get any satisfactory scaled plot. In this case you might want to try the unit vector plot. :[font = text; inactive; preserveAspect; ] _ The next plot runs unsatifactorily because it attempts to plot F[x,y]/ÎFã[ãxã,ãyã]ã@ãFã[ãxã,ãyã] at {x,y} = {0,0}. Unfortunately F[0,0] = 0 and when Mathematica tries to plot {0,0}/Î{ã0ã,ã0ã}ã@ã{ã0ã,ã0ã}, Mathematica gives up. Try it if you like: :[font = input; preserveAspect; ] unitfieldplot = Table[Vector[{x,y},{x,y} + F[x,y]/Sqrt[F[x,y].F[x,y]],RGBColor[0,0,1]], {x,-3,3,0.5},{y,-3,3,0.5}]; Show[unitfieldplot,Axes->Automatic]; :[font = text; inactive; preserveAspect; ] You can fix this by jiggling the plotting limits so the point {x,y} = {0,0} does not come up in the plot: :[font = input; preserveAspect; ] unitfieldplot = Table[Vector[{x,y},{x,y} + F[x,y]/Sqrt[F[x,y].F[x,y]],RGBColor[0,0,1]], {x,-3.1,2.9,0.5},{y,-3,3,0.5}]; Show[unitfieldplot,Axes->Automatic]; :[font = text; inactive; preserveAspect; ] A successful unit vector plot always looks good, but it has two inherent drawbacks: _ Because all the vectors are the same length, you are not able to use this plot to visualize the speed of the flow. All you see is the direction. _ If F[x,y] has a complicated formula, then making the table of unit field vectors can burn a heck of a lot of computer time. To see why, look at: :[font = input; preserveAspect; ] Clear[F,x,y,z] F[x_,y_,z] = {x - 1, y - 2,z - 3}/((x - 1)^2 + (y - 2)^2 + (z - 3)^2)^3/2 :[font = text; inactive; preserveAspect; ] And: :[font = input; preserveAspect; ] {x,y,z} + F[x,y,z]/Sqrt[F[x,y,z].F[x,y,z]] :[font = text; inactive; preserveAspect; endGroup; ] The machine will spend a lot of time on that one. Still, when the conditions are right, the unit vector plot can be irresistible. This choice is yours. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] T.5) Flow of a vector field across a curve. :[font = subsubsection; inactive; preserveAspect; ] T.5.a.i) :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Describe the net flow across the curve P[t] = {“Òå + Cos[t],Sin[2 t]} with -“Òä ² t ² “Òä of a fluid whose velocity is given by the vector field F[x,y] = {x,y}. :[font = subsubsection; inactive; preserveAspect; ] Answer: :[font = smalltext; inactive; preserveAspect; ] Enter the vector field: :[font = input; preserveAspect; ] Clear[F,m,n,x,y] m[x_,y_] = x; n[x_,y_] = y; F[x_,y_] = {m[x,y],n[x,y]} :[font = smalltext; inactive; preserveAspect; ] Here is the curve: :[font = input; preserveAspect; ] Clear[t] x[t_] = 1/2 + Cos[t]; y[t_] = Sin[2 t]; curveplot = ParametricPlot[{x[t],y[t]},{t,-Pi/2,Pi/2}, PlotStyle->{{RGBColor[1,0,0],Thickness[0.02]}}, AspectRatio->Automatic]; :[font = smalltext; inactive; preserveAspect; ] Check out what's happening right on the curve: :[font = input; preserveAspect; ] fieldplot = Table[ Vector[{x[t],y[t]},{x[t],y[t]} + F[x[t],y[t]],RGBColor[0,0,1]], {t,-Pi/2,Pi/2,Pi/16}]; Show[curveplot,fieldplot,Axes->Automatic, AspectRatio->Automatic,AxesLabel->{"x","y"}]; :[font = smalltext; inactive; preserveAspect; ] Heavy flow in and heavy flow out. Let's check out actual flow across of the curve as indicated by the components of these vectors perpendicular to the curve. Let's look at these. At a point {x[t], y[t]} on the curve, a unit vector perpendicular to the curve is: :[font = input; preserveAspect; ] Clear[unitnormal] unitnormal[t_] = Expand[{y'[t],-x'[t]}/Sqrt[y'[t]^2 + (-x'[t])^2],Trig->True] :[font = smalltext; inactive; preserveAspect; ] The component of the flow perpendicular to the curve at a point {x[t], y[t]} on the curve is the component of the velocity in the direction of unitnormal[t]. Now calculate and plot the component of the velocity field F[x,y] perpendicular to the curve: :[font = input; preserveAspect; ] Clear[normcomp] normcomp[t_] = N[(F[x[t],y[t]].unitnormal[t]) unitnormal[t]]; perpflow = Table[Vector[N[{x[t],y[t]}],N[{x[t],y[t]} + normcomp[t]],RGBColor[0,0,1]], {t,-Pi/2,Pi/2,Pi/16}]; Show[curveplot,perpflow,Axes->Automatic, AspectRatio->Automatic,AxesLabel->{"x","y"}, PlotRange->All]; :[font = smalltext; inactive; preserveAspect; ] Those cap N's are in there to speed up the running time. :[font = smalltext; inactive; preserveAspect; endGroup; ] Now we see the true strength of the actual flow across the curve. The length of each of these normal components of the flow measures the actual flow across the curve at the point at which the vector's tail is anchored. The outward flow more than balances the inward flow. No much doubt about it; the net flow across this curve is from inside to outside. :[font = subsubsection; inactive; preserveAspect; ] T.5.a.ii) :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Continue with the same field and the same curve as in part i). At what points {x[t],y[t]} on the curve is the flow from inside to outside? At what point (or points) is the inside to outside flow the greatest? At what points {x[t],y[t]} is the flow from outside to inside? At what point (or points) is the outside to inside flow the greatest? :[font = subsubsection; inactive; preserveAspect; ] Answer: :[font = smalltext; inactive; preserveAspect; ] Check the unit normals: :[font = input; preserveAspect; ] unitnormals = Table[Vector[{x[t],y[t]}, {x[t],y[t]} + unitnormal[t],RGBColor[0,0,1]], {t,-Pi/3,Pi/3,Pi/6}]; Show[curveplot,unitnormals,Axes->Automatic, AspectRatio->Automatic,AxesLabel->{"x","y"}, PlotRange->All]; :[font = smalltext; inactive; preserveAspect; ] The unit normals point to the outside. This tells you that the flow across the curve at {x[t],y[t]} is from inside to outside if F[x[t],y[t]]@unitnormal[t] > 0. :[font = input; preserveAspect; ] Plot[N[F[x[t],y[t]].unitnormal[t]],{t,-Pi/2,Pi/2}]; :[font = input; preserveAspect; ] FindRoot[F[x[t],y[t]].unitnormal[t] == 0,{t,1}] :[font = smalltext; inactive; preserveAspect; ] The flow is from inside to outside at {x[t],y[t]} provided -0.970123 < t < 0.970123. There is no flow across the curve at the points {x[t],y[t]} for t = -0.970123 or 0.970123. The flow is from outside to inside at {x[t],y[t]} provided -“Òä ² t < -0.970123 or 0.970123 < t ² “Òä. To find the points at which the inside to outside flow is the greatest, run Newton's method: :[font = input; preserveAspect; ] Clear[t]; left=D[(F[x[t],y[t]].unitnormal[t]),t]; tout = FindRoot[left == 0,{t,0.6}] :[font = smalltext; inactive; preserveAspect; ] The points at which the inside to outside flow is the greatest are: :[font = input; preserveAspect; ] outpoint1 ={x[0.579949],y[0.579949]} :[font = input; preserveAspect; ] outpoint2 ={x[-0.579949],y[-0.579949]} :[font = smalltext; inactive; preserveAspect; ] The graph tells you that the point at which the outside to inside flow is the greatest is: :[font = input; preserveAspect; ] inpoint = {x[Pi/2],y[Pi/2]} :[font = smalltext; inactive; preserveAspect; ] Take another look: :[font = input; preserveAspect; ] points = Graphics[{PointSize[0.08],Point[outpoint1], Point[outpoint2],Point[inpoint]}]; Show[curveplot,points,perpflow,Axes->Automatic, AspectRatio->Automatic,AxesLabel->{"x","y"}, PlotRange->All]; :[font = smalltext; inactive; preserveAspect; endGroup; ] Looks good. :[font = subsubsection; inactive; preserveAspect; ] T.5.b) :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Describe the net flow across the circle xç + yç = 1 of a fluid whose flow is given by the vector field F[x,y] = {-y, x }. :[font = subsubsection; inactive; preserveAspect; ] Answer: :[font = smalltext; inactive; preserveAspect; ] Enter the vector field: :[font = input; preserveAspect; ] Clear[F,m,n,x,y] m[x_,y_] = -y; n[x_,y_] = x; F[x_,y_] = {m[x,y],n[x,y]} :[font = smalltext; inactive; preserveAspect; ] Here is the curve: :[font = input; preserveAspect; ] Clear[t] x[t_] = Cos[t]; y[t_] = Sin[t]; curveplot = ParametricPlot[{x[t],y[t]},{t,0,2 Pi}, PlotStyle->{{RGBColor[1,0,0],Thickness[0.009]}}, AspectRatio->Automatic,AxesOrigin->{0,0}]; :[font = smalltext; inactive; preserveAspect; ] Take a look at the flow vectors F[x,y] right on the curve: :[font = input; preserveAspect; ] Clear[points,t] fieldplot = Table[Vector[{x[t],y[t]}, {x[t],y[t]} + F[x[t],y[t]],RGBColor[0,0,1]], {t,0, 2 Pi,2 Pi/16}]; Show[curveplot,fieldplot,AxesOrigin->{0,0}, AspectRatio->Automatic,AxesLabel->{"x","y"}]; :[font = smalltext; inactive; preserveAspect; ] It looks like there is no flow in or out. Check the normal components of the flow to be sure: :[font = input; preserveAspect; ] Clear[unitnormal] unitnormal[t_] = Expand[{y'[t],-x'[t]}/Sqrt[y'[t]^2 + (-x'[t])^2],Trig->True]; Clear[normcomp] normcomp[t_] = (F[x[t],y[t]].unitnormal[t]) unitnormal[t] :[font = smalltext; inactive; preserveAspect; endGroup; endGroup; endGroup; ] Just as our eyes told us, there is no flow over this curve. :[font = section; inactive; Cclosed; preserveAspect; startGroup; ] Give It a Try :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] G.1) Components. :[font = subsubsection; inactive; preserveAspect; ] G.1.a) :[font = text; inactive; preserveAspect; ] Here are X = {1,2} and the unit vector U = {2/Î5,1/Î5}. :[font = input; preserveAspect; ] X = {0.5,2}; U = {2/Sqrt[5],1/Sqrt[5]}; Show[Vector[{0,0},X,RGBColor[0,0,1]],Vector[{0,0},U,RGBColor[1,0,0]], Axes->Automatic,AspectRatio->Automatic]; :[font = text; inactive; preserveAspect; ] How does the picture reveal with no calculation that U@X > 0? Confirm what you say by calculating U@X. Calculate X‹ = the component of X in the direction of U. Is X - X‹ perpendicular to U? Plot X and X‹ with tails at the origin and plot X - X‹ with its tail at the tip of X‹ all on the same plot. Comment on what you see. :[font = subsubsection; inactive; preserveAspect; ] G.1.b) :[font = text; inactive; preserveAspect; ] Here are X = {1,2} and Y = {-1,1} :[font = input; preserveAspect; ] X = {3,1}; Y = {-1,1}; Show[Vector[{0,0},X,RGBColor[0,0,1]], Vector[{0,0},Y,RGBColor[1,0,0]], Axes->Automatic,AspectRatio->Automatic]; :[font = text; inactive; preserveAspect; ] How does the picture reveal with no calculation that Y@X < 0? Confirm what you say by calculating Y@X. Agree that U is a unit vector pointing in the same direction as Y and calculate U. Calculate X‹ = the component of X in the direction of U. = the component of X in the direction of Y. Is X - X‹ perpendicular to Y? Plot X and X‹ with tails at the origin and plot X - X‹ with its tail at the tip of X‹ all on the same plot. Comment on what you see. :[font = subsubsection; inactive; preserveAspect; ] G.1.c) :[font = text; inactive; preserveAspect; ] Here is a pair of unit vectors. :[font = input; preserveAspect; ] U = {Cos[Pi/6],Sin[Pi/6]} V = {-Sin[Pi/6],Cos[Pi/6]} :[font = text; inactive; preserveAspect; ] They are orthogonal (perpendicular). :[font = input; preserveAspect; ] U.V :[font = text; inactive; preserveAspect; ] Take the vector X = {-2,1}, resolve it into its components X‹ and X-X‹ , and then resolve it into its components Xˆ and X-Xˆ . Compare the results. Why is it that these components match up in pairs? :[font = subsubsection; inactive; preserveAspect; ] G.1.d) :[font = text; inactive; preserveAspect; endGroup; ] Explain why, if U and V are perpendicular, unit vectors, and X is any other vector, it is true that X‹ = X - Xˆ and Xˆ = X - X‹ . :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] G.2) The sign of the dot product. :[font = subsubsection; inactive; preserveAspect; ] G.2.a) :[font = text; inactive; preserveAspect; ] If X is a vector and Y is a unit vector of the same dimension and X@Y > 0, then does the component of X in the direction of Y push with Y or against Y? What if X@Y < 0? :[font = subsubsection; inactive; preserveAspect; ] G.2.b) :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] You have a curve given by P[t] = {x[t],y[t]} with a ² t ² b with P[a] = P[b] and no other loops. (This means that the curve is like a deformed circle.) If as t advances from a to b, P[t] advances around the curve in a counterclockwise way, then does the unit normal {y'[t], -x'[t]}/Îyã'ã[ãtã]ãçã ã+ã ãxã'ã[ãtã]ãç with its tail at P[t] point to the outside of the curve or to the inside of the curve? :[font = special1; inactive; preserveAspect; ] Tip: :[font = smalltext; inactive; preserveAspect; endGroup; ] If you don't know, then try it for the circle x[t] = Cos[t] y[t] = Sin[t] with 0 ² t ² 2 ` actual plotting the circle with a few unit normals {y'[t],-x'[t]}/Îyã'ã[ãtã]ãçã ã+ã ãxã'ã[ãtã]ãç with their tails at {x[t],y[t]}. This is a good example because as t advances from 0 to 2 `, the point P[t] = {x[t],y[t]} advances around the circle in a counterclockwise way. :[font = subsubsection; inactive; preserveAspect; ] G.2.c.i) :[font = text; inactive; preserveAspect; ] If F[x,y] = {m[x,y],n[x,y]} is a vector field, then how does the sign of F[x[t],y[t]]@{y'[t],-x'[t]} tell you whether the flow of F[x,y] across this curve at the point P[t] = {x[t],y[t]} is from inside to outside or outside to inside? :[font = subsubsection; inactive; preserveAspect; ] G.2.c.ii) :[font = text; inactive; preserveAspect; ] Here is a vector field: :[font = input; preserveAspect; ] Clear[F,x,y] F[x_,y_] = {y,x/2} :[font = text; inactive; preserveAspect; ] And here is a curve: :[font = input; preserveAspect; ] Clear[P,t] x[t_] = 2 (1 - Cos[t]) Cos[t] + 2; y[t_] = 2 Sin[t]; ParametricPlot[{x[t],y[t]},{t,0,2 Pi}, PlotStyle->{{RGBColor[0,0,1],Thickness[0.008]}}, AxesLabel->{"x","y"}]; :[font = text; inactive; preserveAspect; ] Now look at a plot of F[x[t],y[t]]@{y'[t],-x'[t]} as t runs from 0 to 2 `: :[font = input; preserveAspect; ] Plot[F[x[t],y[t]].{y'[t],-x'[t]},{t,0,2 Pi}, PlotStyle->{{RGBColor[1,0,0],Thickness[0.008]}}, AxesLabel->{"x","y"}]; :[font = text; inactive; preserveAspect; ] Use the information you see here to give approximate plots of the part of the curve over which the flow of the vector field is from inside to the outside. :[font = subsubsection; inactive; preserveAspect; ] G.2.d) :[font = text; inactive; preserveAspect; endGroup; ] At time t with 0 ² t ² 2 `, Luke Skywalker is at the point {x[t],y[t]} = {Cos[t], 3 Sin[t]}. Darth Vader has activated a force field that puts a force (= push or pull) equal to F[x,y] = {x,-y} on any object at {x, y}. Why is the force pushing against Skywalker's movement if F[x[t],y[t]]@{x'[t],y'[t]} < 0? Why is the force pushing with Skywalker's movement if F[x[t],y[t]]@{x'[t],y'[t]} < 0? For approximately which t's is Vader's force with young Skywalker? :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] G.3) Velocity and acceleration. :[font = subsubsection; inactive; preserveAspect; ] G.3.a.i) :[font = text; inactive; preserveAspect; ] An object is at P[t] = {9˚˚ Sin[t],3 ˚˚Cos[t]} at time t. Plot in true scale the motion of the object for 0 ² t ² “ÒèÒä including several velocity vectors. Then on a separate plot show in true scale the motion of the object for 0 ² t ² “ÒèÒä including several tangential and normal components of acceleration. Discuss what each plot reveals. Finally show them together and discuss relations between the plots. :[font = subsubsection; inactive; preserveAspect; ] G.3.a.ii) :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] For 0 ² t ² “ÒèÒä, the object in part i) is constrained to move on an ellipse. Suppose at the instant t = “ÒèÒä, the object is released from all constraints and allowed to move of its own free will independent of any forces due to acceleration. Plot the path the object takes. :[font = special1; inactive; preserveAspect; ] Tip: :[font = smalltext; inactive; preserveAspect; endGroup; ] Does it continue on the ellipse or does it do something else? :[font = subsubsection; inactive; preserveAspect; ] G.3.a.iii) :[font = text; inactive; preserveAspect; ] The speed of the object in part i) at time t is defined to be the length of the velocity vector at time t; in other words speed[t] = Sqrt[velocity[t]@velocity[t]]. Calculate D[speed[t],t] and compare it with acceleration[t]@unittangent[t]. Try to explain why you think that the result is natural or weird. :[font = subsubsection; inactive; preserveAspect; ] G.3.a.iv) :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] If you know the speed[0], then how do you give a formula for speed[t] in terms of acceleration[t]@unittangent[t]? :[font = special1; inactive; preserveAspect; ] Tip: :[font = smalltext; inactive; preserveAspect; endGroup; ] Two-four-six-eight, What do we integrate? :[font = subsubsection; inactive; preserveAspect; ] G.3.a.v) :[font = text; inactive; preserveAspect; ] Can you get any information about speed[t] if you know the tangential component of acceleration but lose all your information about the normal component of acceleration? :[font = subsubsection; inactive; preserveAspect; ] G.3.b) :[font = text; inactive; preserveAspect; endGroup; ] For P[t] = {2 Sin[t], 6 Sin[t/2]ç,3 Cos[t]}, plot in true scale the motion of the object for 1 ² t ² 6 including several velocity vectors. Then on a separate plot show the motion of the object for 1 ² t ² 6 including several tangential components of acceleration. On a third plot, show the motion of the object for 0 ² t ² 6 including several tangential and normal components of acceleration Discuss what each plot reveals. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] G.4) Flow across a curve. :[font = subsubsection; inactive; preserveAspect; ] G.4.a) :[font = text; inactive; preserveAspect; ] Describe the net flow across the circle xç + yç = 1 of a fluid whose velocity is given by the vector field F[x,y] = {x + £Òñ, x - “Òñ}. Is the net flow across this curve from inside to outside or outside to inside? :[font = subsubsection; inactive; preserveAspect; ] G.4.b.i) :[font = text; inactive; preserveAspect; ] Describe the net flow across the circle x[t] = 1 + Cos[t] and y[t] = 1 + Sin[t] for 0 ² t ² 2` of a fluid whose velocity is given by the vector field F[x,y] = {Cos[“Òû] Cosh[y]/2, Sin[“Òû] Sinh[y]}. Is the net flow across this curve from inside to outside or outside to inside? :[font = subsubsection; inactive; preserveAspect; ] G.4.b.ii) :[font = text; inactive; preserveAspect; ] Continue with the same field and the same curve as in part i). At what points {x[t],y[t]} on the curve is the flow from inside to outside? At what point (or points) is the inside to outside flow the greatest? At what points {x[t],y[t]} is the flow from outside to inside? At what point (or points) is the outside to inside flow the greatest? :[font = subsubsection; inactive; preserveAspect; ] G.4.c) :[font = text; inactive; preserveAspect; endGroup; ] Describe the net flow across the line segment x[t] = 2 and y[t] = t for 0 ² t ² 1 of a fluid whose velocity is given by the vector field F[x,y] = {£Òåxè˚-˚˚x˚˚˚yç,-xç˚˚y˚˚˚+˚˚˚£Òå˚˚˚yè}. Is the net flow across this curve from left to right or right to left? :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] G.5) Scaling a vector field. :[font = subsubsection; inactive; preserveAspect; ] G.5.a) :[font = text; inactive; preserveAspect; ] Here is a two dimensional vector field with an unscaled plot: :[font = input; preserveAspect; ] Clear[F,x,y] F[x_,y_] = {18.4 - 0.8 x^3 - 8.2 y, -8.2 x - 0.4 y^3} :[font = input; preserveAspect; ] fieldplot = Table[Vector[{x,y},{x,y} + F[x,y],RGBColor[0,0,1]], {x,-5,5},{y,-5,5}]; Show[fieldplot,Axes->Automatic,AxesLabel->{"x","y"}]; :[font = text; inactive; preserveAspect; ] This plot sucks. You can't see what's happening. Give a scaled plot of this vector field at the same points that shows it off to good advantage. Pretend this field represents water flow and use your plot to determine whether there are any drains within the plot. :[font = subsubsection; inactive; preserveAspect; ] G.5.b) :[font = text; inactive; preserveAspect; ] Here is a two dimensional vector field with an unscaled plot: :[font = input; preserveAspect; ] Clear[F,x,y,z] F[x_,y_,z_] = {2 x,2 y,-z} :[font = input; preserveAspect; ] {ax,bx} = {0.1,6.1}; {ay,by} = {0.1,6.1}; {az,bz} = {0.1,8.1}; flow = Table[Vector[N[{x,y,z}],N[{x,y,z} + F[x,y,z]]], {x,ax,bx,2},{y,ay,by,2},{z,az,bz,2}]; coordinateaxes = {Graphics3D[Line[{{-1,0,0},{1,0,0}}]], Graphics3D[Line[{{0,-1,0},{0,1,0}}]], Graphics3D[Line[{{0,0,-1},{0,0,1}}]]}; Show[coordinateaxes,flow, ViewPoint->{2.747, 1.594, 1.168}, PlotRange->All]; :[font = text; inactive; preserveAspect; endGroup; ] There's a glimmer of information here. Give a scaled plot of this vector field at the same points that shows it off to much better advantage. Pretend this field represents air flow and use your plot describe the flow. Where in this plot is the air nearly motionless? :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] G.6) Trajectories. :[font = subsubsection; inactive; preserveAspect; ] G.6.a) :[font = text; inactive; preserveAspect; ] Here is a vector field and a plot: :[font = input; preserveAspect; ] Clear[F,x,y] F[x_,y_] = {-0.036 x E^x^2 + 0.123 y, 0.123 x - 0.087 y E^y^2} :[font = input; preserveAspect; ] fieldplot = Table[Vector[{x,y},{x,y} + F[x,y],RGBColor[0,0,1]], {x,-1.25,1.25,2.5/10},{y,-1.25,1.25,2.5/10}]; Show[fieldplot,Axes->Automatic,AxesLabel->{"x","y"}]; :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] As you can see from the plot, if you drop a cork into this flow at any starting point within the plot, it will float along to one of two special points and stop dead. Plot some trajectories in an effort to find the the approximate locations of these two special points. :[font = special1; inactive; preserveAspect; ] Tip: :[font = smalltext; inactive; preserveAspect; endGroup; ] If you plot four well chosen tarjectories and iterate them enough,then you will probably be happy. :[font = subsubsection; inactive; preserveAspect; ] G.6.b) Crossing of trajectories. :[font = smalltext; inactive; preserveAspect; ] Calculus&Mathematica thanks Professor Stephanie Alexander of the University of Illinois for help on these problems. :[font = text; inactive; preserveAspect; ] Can two trajectories of a vector field ever cross over each other like this: :[font = input; preserveAspect; ] Plot[{Cos[x],Sin[x]},{x,Pi/8,3 Pi/8}, PlotStyle->{{RGBColor[1,0,0],Thickness[0.02]}}, AxesOrigin->{.5,.5},AxesLabel->{"x","y"},Ticks->None]; :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Why or why not? :[font = special1; inactive; preserveAspect; ] Tip: :[font = smalltext; inactive; preserveAspect; endGroup; endGroup; ] Think of it this way: At the cross over point, which way must the floating cork move? :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] G.7) "Drifting along with a tumbling tumbleweed." :[font = subsubsection; inactive; preserveAspect; ] G.7.a) :[font = text; inactive; preserveAspect; ] Wind is swirling through the desert region -4 ² x ² 4, 0 ² y ² 8. At a point {x,y} in this region, the velocity of the wind is w[x,y] = {0.18 + 0.6 Sin[y], 0.17 y/(1+xç)}. Here is a picture of the wind as we look down from a heliocopter at this desert region: :[font = smalltext; inactive; preserveAspect; ] The N[] is hung around {x,y} + wind[x,y] to speed up the plot. :[font = input; preserveAspect; ] Clear[wind,x,y] wind[x_,y_] = {0.18 + 0.6 Sin[y],0.12 y /(1 + x^2)}; windplot = Show[Table[Vector[{x,y},N[{x,y} + wind[x,y]],RGBColor[0,0,1]], {x,-4,4},{y,0,8}], Axes->Automatic,AxesLabel->{"x","y"}]; :[font = text; inactive; preserveAspect; endGroup; ] A tumbleweed drifting along was spotted at the point {-2,2}. Add a plot of the approximate path of this drifting tumbleweed to the plot above. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] G.8) Spigots and drains. :[font = subsubsection; inactive; preserveAspect; ] G.8.a) :[font = text; inactive; preserveAspect; ] Here is water flowing from left to right: :[font = input; preserveAspect; ] Clear[Fcurrent,x,y] currentstrength = 0.51; Fcurrent[x_,y_] = currentstrength{1,0} :[font = input; preserveAspect; ] currentfieldplot = Table[Vector[{x,y},{x,y} + Fcurrent[x,y], RGBColor[0,0,1]], {x,-4,4},{y,-2,3}]; Show[currentfieldplot,Axes->Automatic]; :[font = text; inactive; preserveAspect; ] Here is water flowing into a drain at {0.5,0.5}: :[font = input; preserveAspect; ] Clear[Fsink,x,y] {a,b} = {0.5,0.5}; sinkstrength = 0.57; Fsink[x_,y_] = - sinkstrength {x - a,y - b}/((x - a)^2 + (y - b)^2) :[font = input; preserveAspect; ] sinkfieldplot = Table[Vector[{x,y},{x,y} + Fsink[x,y], RGBColor[0,0,1]], {x,-4,4},{y,-2,3}]; sink = Graphics[{RGBColor[0,0,1],PointSize[0.04],Point[{a,b}]}]; Show[sinkfieldplot,sink, AxesLabel->{"x","y"}, Axes->Automatic]; :[font = text; inactive; preserveAspect; ] Here is water flowing out of a spigot at {-1.5,0.5} :[font = input; preserveAspect; ] Clear[Fsource,x,y] {aa,bb} = {-1.5,0.5}; sourcestrength = 0.67; Fsource[x_,y_] = +sourcestrength{ x - aa,y - bb}/ ((x - aa)^2 + (y - bb)^2); :[font = input; preserveAspect; ] sourcefieldplot = Table[Vector[{x,y},{x,y} + Fsource[x,y],RGBColor[0,0,1]], {x,-4,4},{y,-2,3}]; source = Graphics[{RGBColor[1,0,0],PointSize[0.04], Point[{aa,bb}]}]; Show[sourcefieldplot,source, AxesLabel->{"x","y"}, Axes->Automatic]; :[font = smalltext; inactive; preserveAspect; ] Here is water flowing under the influence of all three together: :[font = input; preserveAspect; ] Clear[Ftogether,x,y] Ftogether[x_,y_] = Fcurrent[x,y] + Fsource[x,y] + Fsink[x,y] :[font = input; preserveAspect; ] combinationfieldplot = Table[Vector[{x,y},{x,y} + Ftogether[x,y], RGBColor[0,0,1]], {x,-4,4},{y,-2,3}]; Show[combinationfieldplot,source,sink, AxesLabel->{"x","y"}, Axes->Automatic]; :[font = text; inactive; preserveAspect; endGroup; ] Experiment with different strengths and positions of the sources and sinks and report on your observations. What happens you make the source strength equal to the sink strength and you put the source and the sink close together? How big does the current strength have to be in relation to the source and sink strengths to make the influence of the sources and sinks negiblible? :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] G.9) Electrical fields. :[font = subsubsection; inactive; preserveAspect; ] G.9.a) :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Plot and describe the electrical field resulting from equal charges of the same sign at {1.5, 0} and {-1.5, 0}. Include a plot of the unit vector field. :[font = special1; inactive; preserveAspect; ] Tip: :[font = smalltext; inactive; preserveAspect; endGroup; ] Make sure your plot does not ask for the vectors at the points {1.5, 0} and {-1.5, 0}. themselves. :[font = subsubsection; inactive; preserveAspect; ] G.9.b): Dipoles. :[font = text; inactive; preserveAspect; ] A dipole antenna can be approximated by two charges of the same magnitude but opposite sign separated by a small distance. Dipoles are especially important in atomic theory. Richard Feynman explains it this way: :[font = text; inactive; preserveAspect; ] "Although an atom or molecule remains neutral in an external electronic field, there is a tiny separation of its positive and negative charges and it becomes a microscopic dipole." :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Plot and describe the electrical field resulting from a positive charge at {0.01 ,0} and the opposite charge of the same magnitude at {-0.01,0}. Include a plot of the unit vector field. :[font = special1; inactive; preserveAspect; ] Tip: :[font = smalltext; inactive; preserveAspect; endGroup; endGroup; ] All hell breaks loose near {0,0}; so make sure your plot does not ask for the vectors too close to {0, 0}. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] G.10) Recreational fluid flow. :[font = text; inactive; preserveAspect; ] This recreational plotting session looks at some actual flows of incompressible fluids like water. If you really like these, then hold onto your hats because later in the course, you'll learn how to set up these flows on your own. :[font = subsubsection; inactive; preserveAspect; ] G.10.a) Flow around a corner :[font = text; inactive; preserveAspect; ] Here's a look at water flowing down the from above positive x-axis along an infinite dike built on the positive y-axis and against an infinite dike built on the positive on the x-axis: :[font = input; preserveAspect; ] Clear[F,x,y] F[x_,y_] = {x,-y} :[font = input; preserveAspect; ] ax = 0.1; bx = 6.1; ay = 0.1; by = 8.1; scalefactor = 0.3; flow = Table[Vector[{x,y},{x,y} + scalefactor F[x,y],RGBColor[0,0,1]], {x,ax,bx},{y,ay,by}]; pointplot = Table[Graphics[{RGBColor[1,0,0],PointSize[0.01], Point[{x,y}]}],{x,ax,bx},{y,ay,by}]; Show[flow,pointplot,AxesOrigin->{0,0}, AxesLabel->{"x","y"},AspectRatio->Automatic]; :[font = text; inactive; preserveAspect; ] The direction of each vector gives the direction of the water at the tail of the vector. The length of the vector is proportional to the speed of the water at the tail of the vector. Observe how the water slows down as it makes the sharp turn at the lower left. :[font = smalltext; inactive; preserveAspect; ] In case, you're worried, loosen up because you're not asked to do anything in G.10.a); just sit back any enjoy. :[font = subsubsection; inactive; preserveAspect; ] G.10.b) Flow down on the left and up on the right. :[font = text; inactive; preserveAspect; ] Here's a look at water flowing down a chute on the left into a dead end and then turning around and flowing back out on the right side. :[font = input; preserveAspect; ] Clear[F,m,n,x,y] m[x_,y_] = Cos[x/2] Cosh[y]/2; n[x_,y_] = Sin[x/2] Sinh[y]; F[x_,y_] = {m[x,y],n[x,y]}; :[font = input; preserveAspect; ] ax = -3; bx = 3; ay = 0.5; by = 3; scalefactor = 0.25; flow = Table[Vector[{x,y},{x,y} + scalefactor F[x,y], RGBColor[0,0,1]], {x,ax,bx,3/4},{y,ay,by,2.5/3}]; pointplot = Table[Graphics[{RGBColor[1,0,0],PointSize[0.01], Point[{x,y}]}],{x,ax,bx,3/4},{y,ay,by,2.5/3}]; chute = Graphics[Thickness[0.01], Line[{{-Pi,bx},{-Pi,0},{Pi,0},{Pi,by + 2.5}}]]; Show[flow,chute,pointplot,AxesOrigin->{0,0}, AxesLabel->{"x","y"}]; :[font = text; inactive; preserveAspect; ] The direction of each vector gives the direction of the water at the tail of the vector. The length of the vector is proportional to the speed of the water at the tail of the vector. The water at the end of the chute moves more slowly than water higher up. In fact, the flow at the center of the end of the chute does not amount to very much. :[font = text; inactive; preserveAspect; ] The flow has downward components on the left and upward components on the right. Do you think that the flow has any upward or downward component right on the y-axis? How do you describe the nature of the flow as the water moves across the y-axis? :[font = subsubsection; inactive; preserveAspect; ] G.10.c) :[font = text; inactive; preserveAspect; ] Describe in words the flow plotted below. :[font = input; preserveAspect; ] Clear[F,m,n,x,y] m[x_,y_] = (x^4 + y^4 + 2 x^2 y^2 - x^2)/(x^2 + y^2)^2 :[font = input; preserveAspect; ] n[x_,y_] = -2 x y/(x^2 + y^2)^2 :[font = input; preserveAspect; ] F[x_,y_] = { m[x,y],n[x,y]} :[font = input; preserveAspect; endGroup; endGroup; ] ax = -2.5; bx = 2.5; ay = -2.8; by = 2.8; scalefactor = .6; topflow = Table[Vector[{x,y},{x,y} + scalefactor F[x,y], RGBColor[0,0,1]], {x,ax,bx},{y,.8,by,.5}]; bottomflow = Table[Vector[{x,y},{x,y} + scalefactor F[x,y], RGBColor[0,0,1]], {x,ax,bx},{y,ay,-.8,.5}]; leftflow = Table[Vector[{x,y},{x,y} + scalefactor F[x,y], RGBColor[0,0,1]], {x,ax,-1,.5},{y,-.4,.4,.4}]; rightflow = Table[Vector[{x,y},{x,y} + scalefactor F[x,y], RGBColor[0,0,1]], {x,1,bx,.5},{y,-.4,.4,.4}]; pipe = Graphics[PointSize[0.3],Point[{0,0}]]; Show[topflow,bottomflow,leftflow,rightflow,pipe, AxesOrigin->{0,0},AxesLabel->{"x","y"}]; :[font = section; inactive; Cclosed; preserveAspect; startGroup; ] Literacy Sheet :[font = text; inactive; preserveAspect; ] 1. The component of a vector X in the direction of another vector Y is given by ((X@Y)/(Y@Y)) Y. What does this formula reduce to if Y is a unit vector? :[font = text; inactive; preserveAspect; ] 2. Given two vectors X and Y,what formula do you use to find the t that makes the tip of the vector t X is as close as possible to the tip of Y when both X and Y have their tails at the origin? :[font = text; inactive; preserveAspect; ] 3. Here are the vectors X = {1/Sqrt[2],1/Sqrt[2]} and Y = {1,2.5} with their tails at {0,0} shown in true scale: Pencil in the component of Y in the direction of X. :[font = input; preserveAspect; ] X=Vector[{0,0},{1/Sqrt[2],1/Sqrt[2]},RGBColor[1,0,0]]; Y=Vector[{0,0},{1,2.5},RGBColor[0,0,1]]; Show[X,Y,AspectRatio->Automatic]; :[font = text; inactive; preserveAspect; ] Calculate the component of Y in the direction of X. :[font = text; inactive; preserveAspect; ] 4. If X@Y > 0, then is the push of X in the direction of Y with Y or against Y? If X@Y < 0, then is the push of X in the direction of Y with Y or against Y? :[font = text; inactive; preserveAspect; ] 5. Anywhere you happen to be, you feel a push whose direction is the same as the direction of the vector {2,1}. Your velocity at time t ¬ 0 is given by vel[t] ={-t ,tç}. For what times t ¬ 0 are you being helped by the push? At what times t ¬ 0 are you being hindered by the push? :[font = text; inactive; preserveAspect; ] 6. Put the tail of the vector t {1/Sqrt[2],1/Sqrt[2]} = {t/Sqrt[2],t/Sqrt[2]} at {0,0} and say what t must be to make the tip of this vector as close to {4,5} as it can be. :[font = text; inactive; preserveAspect; ] 7. Here is a plot of an object's path shown with a few acceleration vectors: :[font = input; preserveAspect; ] P[t_]={Sin[2t],t^3}; jerry=ParametricPlot[P[t],{t,-3/4,3/4},DisplayFunction->Identity]; accel=Table[Vector[P[s],P[s]+P''[s]/8], {s,-2/3,2/3,1/3}]; Show[jerry,accel,DisplayFunction->$DisplayFunction, AspectRatio->Automatic,PlotRange->All,Axes->None]; :[font = text; inactive; preserveAspect; ] The object is moving from left to right. Pencil in the tangential and normal components of each of the three acceleration vectors in the plot. At which of these four points is the speed of the object increasing? At which of these three points is the speed of the object decreasing? :[font = text; inactive; preserveAspect; ] 8. In two-dimensional motion,does the normal component of acceleration of an object have anything to do with the speed of the object? How about the tangential component of the acceleration? :[font = text; inactive; preserveAspect; ] 9. What good is the idea of the component of one vector in the direction of another vector? :[font = text; inactive; preserveAspect; ] 10. Plot several of the field vectors of F[x, y] = {x, y} on the ellipse (x/4)ç +(y/2)ç = 1. :[font = input; preserveAspect; ] ParametricPlot[{4Cos[t],2Sin[t]},{t,-Pi,Pi}]; :[font = text; inactive; preserveAspect; ] Is the net flow from outside to inside or inside to outside? Are all the field vectors you plotted perpendicular to the curve? Should they have been perpendicular to the curve? :[font = smalltext; inactive; preserveAspect; ] 11. Here is a plot of a vector field: :[font = input; Cclosed; preserveAspect; startGroup; ] Clear[F,m,n,x,y] m[x_,y_] = 0.5 (y - 1); n[x_,y_] = 0.3 (x - 0.5); F[x_,y_] = {m[x,y],n[x,y]}; :[font = input; preserveAspect; ] pointplot = Table[Graphics[{RGBColor[1,0,0],PointSize[0.01], Point[{x,y}]}],{x,-3,3},{y,-3,3}]; :[font = input; preserveAspect; endGroup; ] vectorfield = Table[Vector[{x,y},{x,y} + F[x,y], RGBColor[0,0,1]], {x,-3,3},{y,-3,3}]; Show[pointplot,vectorfield, AxesOrigin->{0,0},AspectRatio->Automatic, AxesLabel->{"x","y"}]; :[font = text; inactive; preserveAspect; ] Pencil in a couple of trajectories. :[font = text; inactive; preserveAspect; ] 12. Here is a plot of a new vector field: :[font = input; Cclosed; preserveAspect; startGroup; ] Clear[f,gradf,x,y] f[x_,y_] = 1.2 E^(x^2) + 2.9 E^(y^2) - 8.2 x y; :[font = input; preserveAspect; ] gradf[x_,y_] = {D[f[x,y],x],D[f[x,y],y]}; :[font = input; preserveAspect; endGroup; ] minimizer ={0.989761,0.771567}; min = Graphics[PointSize[0.05],Point[minimizer]]; Clear[neggradf] neggradf[x_,y_] = - gradf[x,y]; scalefactor = 0.013; h = 0.2; neggradfieldplot = Table[Vector[{x,y}, {x,y} + scalefactor neggradf[x,y],RGBColor[0,1,0]], {x,0.95 - h,0.95 + 5 h/4,h/4},{y,0.7 - h,0.7 + h,h/4}]; Show[min,neggradfieldplot, Axes->Automatic,AxesLabel->{"x","y"}]; :[font = text; inactive; preserveAspect; ] Pencil in a couple of trajectories. :[font = text; inactive; preserveAspect; ] 13. Here is a picture of the flow of a fluid whose velocity is given by the vector field F[x,y] = {yç/2, x y} on the circle (x - 1)ç + (y - 1)ç=1: :[font = input; preserveAspect; ] F[x_,y_]={y^2/2,x y}; P[t_]={Cos[t]+1,Sin[t]+1}; circle=ParametricPlot[P[t],{t,-Pi,Pi}, DisplayFunction->Identity]; rays=Table[Vector[P[t],P[t]+F@@P[t], RGBColor[1,0,0]],{t,0,2Pi,Pi/6}]; Show[circle,rays,DisplayFunction->$DisplayFunction, AspectRatio->Automatic,Ticks->None]; :[font = text; inactive; preserveAspect; ] Here is a picture of the normal components of the same fluid on the same curve: :[font = input; preserveAspect; ] nor[t_]={Cos[t],Sin[t]}; normalcomp[t_]=F@@P[t].nor[t] nor[t]; norrays=Table[Vector[P[t],P[t]+normalcomp[t], RGBColor[0,0,1]], {t,0,2Pi,Pi/6}]; Show[circle,norrays,DisplayFunction->$DisplayFunction, AspectRatio->Automatic,Ticks->None]; :[font = text; inactive; preserveAspect; endGroup; ] Describe in words the net flow of this fluid across this curve. ^*)